Project

General

Profile

Actions

Bug #754

closed

Redmine: unable to use some unicode unicode character in comment

Added by Pierre-Louis Bonicoli about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
Service :: Web
Start date:
2022-03-12
Due date:
% Done:

100%

Estimated time:
Patch Available:
Confirmed:
Yes
Branch:
Entity:
DuckCorp
Security:
No
Help Needed:

Description

While commenting #748#note-7, I found out that some unicode characters raise an error. For example: U+1F4E3, U+1F389.

In the following error message, I replaced these characters with U+1F4E3/U+1F389 (in order to be able to create this issue :)

Started PUT "/journals/2382" for 86.245.117.73 at 2022-03-12 04:31:38 +0000
Processing by JournalsController#update as JS
  Parameters: {"utf8"=>"✓", "journal"=>{"notes"=>"[U+1F4E3] committed commit:dc43d75d1f7e7c01d943f085120f704d2dac831d [U+1F389]\r\n\r\nThanks Loïc ㊗️❤️!", "private_notes"=>"0"}, "commit"=>"Save", "id"=>"2382"}
  Current user: pilou (id=4)
Completed 500 Internal Server Error in 21ms (ActiveRecord: 8.9ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x93\xA3 c...' for column `redmine_dc`.`journals`.`notes` at row 1: UPDATE `journals` SET `notes` = '[U+1F4E3] committed commit:dc43d75d1f7e7c01d943f085120f704d2dac831d [U+1F389]\r\n\r\nThanks Loïc ㊗️❤️!' WHERE `journals`.`id` = 2382):

app/models/journal.rb:81:in `save'
app/controllers/journals_controller.rb:90:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Actions

Also available in: Atom PDF