Defect #24030

When SVN or Git repository has a commit comment include an emoji (4 bytes charactor), error occurs

Added by Jiamin Wang about 3 years ago. Updated 3 months ago.

Status:NewStart date:
Priority:HighDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:-
Resolution: Affected version:3.1.2

Description

I already set the MySQL and all databases' charset to utb8mb4

the error is in fetch_changeset method, when insert the commit comment into database table


Related issues

Related to Redmine - Feature #31921: Changes to properly support 4 byte characters (emoji) whe... Closed

History

#1 Updated by Jiamin Wang about 3 years ago

error occurs in save_revision method in /app/models/git.rb or /app/models/subversion.rb

#2 Updated by Toshi MARUYAMA about 3 years ago

  • Category changed from Database to SCM

#3 Updated by Tobias Fischer 3 months ago

This is still an issue in Redmine 3.4.11

Environment:
  Redmine version                3.4.11.stable.18254
  Ruby version                   2.2.1-p85 (2015-02-26) [x86_64-linux]
  Rails version                  4.2.11.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.17
  Git                            1.7.9.5
  Filesystem                     

Error message in log:

Started GET "/projects/PROJECT/repository/REPO_ID" for 37.24.44.210 at 2019-07-31 09:43:30 +0200
Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"PROJECT", "repository_id"=>"REPO_ID"}
  Current user: USERNAME (id=5)
Completed 500 Internal Server Error in 145ms (ActiveRecord: 13.2ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\xA4\xA6' for column 'comments' at row 1: INSERT INTO `changesets` (`repository_id`, `revision`, `scmid`, `committer`, `commit_date`, `committed_on`, `comments`, `user_id`) VALUES (18, 'a5814b480017f7702d46d084da1aa1a7cb5d05b0', 'a5814b480017f7702d46d084da1aa1a7cb5d05b0', 'Tobias Fischer <tobias.fischer@domain.tld>', '2019-07-04', '2019-07-04 21:35:45', '[ci] gradle file bei vorherigem Commit vergessen

#4 Updated by Tobias Fischer 3 months ago

Funny thing: Also the comment here above get's truncated at the position of the emoji in my log message. Emojis are a big issue for Redmine!

#5 Updated by Marius BALTEANU 2 months ago

  • Related to Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQL added

Also available in: Atom PDF