Project

General

Profile

Actions

Defect #14656

closed

JRuby: Encoding error when creating issues

Added by Vincent Mathon over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Ruby support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I upgraded from Redmine 1.4.4 to Redmine 2.3.2.
Redmine is built as a war using warbler-1.3.8, JRuby 1.7.2 and run on TOMCAT 7.0.37 with a JVM 1.6.31 on a RHEL 64 bit machine.
The database is a Mysql 5.5.28 and redmine tables are using a charset utf8.
We connect Redmine database with the following database.yml:

production:
   adapter: jdbc
   jndi: java:/comp/env/jdbc/Redmine
   driver: com.mysql.jdbc.Driver

We do sometime observe the following issue:

Encoding::CompatibilityError (incompatible character encodings: ASCII-8BIT and UTF-8):
  app/models/issue.rb:159:in `create_or_update'
  app/controllers/issues_controller.rb:141:in `create'

The last database log before the exception is

INFO:   [1m[36mIssue Load (1.0ms)[0m  [1mSELECT `issues`.* FROM `issues` WHERE `issues`.`root_id` IS NULL ORDER BY `rgt` desc LIMIT 1 FOR UPDATE[0m

Note that we can create issues with all kind of strange characters both in subject and detail. But the following case:

Subject=AS400 : fonctionnement autorisation utilisation email à  revoir
Detail=Rendre pré-alimenter à l'utilisation

fails systematically. If the subject becomes "AS400 : fonctionnement autorisation utilisation" and the detail remains unchanged it works !

As a workaround we can create the issue with the subject and update it with the detail in a second step...


Related issues

Related to Redmine - Defect #14883: Update activerecord-jdbc-adapterClosed

Actions
Actions

Also available in: Atom PDF