Charset issues with latin characters - JRuby
Added by Rubén Romero over 12 years ago
Hello,
For my own background using Java I prefered to deploy my redmine installation over tomcat7 with JRuby (1.6.7). My current redmine version is 2.2.2 (but I had the same issue with 2.2.1). I used warble to achieve this.
When creating a new issue with latin characters in the subject e.g. "Prueba Documentación título eñe áéíóú" I get an internal error. This error does not happens when I avoid this characters in the creation and later I update the issue's subject with the correct characters.
Looking into the logs I've found the following message
Encoding::CompatibilityError (incompatible character encodings: ASCII-8BIT and UTF-8): app/controllers/issues_controller.rb:142:in `create'
For more information, I previously migrated from 1.3.0 to 2.2.1. And also tried with other jruby versions (1.6.7.2 and 1.7.2)
The question is. ¿Where is the ASCII-8BIT encoding configured and how can I change it to UTF-8?
Thanks in advance and kind regards,
Rubén.
Replies (1)
RE: Charset issues with latin characters - JRuby
-
Added by Rubén Romero over 12 years ago
Fixed!
When performing the gem install bundler, the 1.7.2 version of jruby-jars is installed by default
$ gem install warbler Fetching: jruby-jars-1.7.2.gem (100%) Fetching: jruby-rack-1.1.13.1.gem (100%) Fetching: rubyzip-0.9.9.gem (100%) Fetching: warbler-1.3.6.gem (100%) Successfully installed jruby-jars-1.7.2 Successfully installed jruby-rack-1.1.13.1 Successfully installed rubyzip-0.9.9 Successfully installed warbler-1.3.6 4 gems installed $ gem list *** LOCAL GEMS *** bundler (1.2.3) jruby-jars (1.7.2) jruby-rack (1.1.13.1) rake (0.8.7) rubyzip (0.9.9) sources (0.0.1) warbler (1.3.6)
Then, uninstalling the 1.7.2 version and installing the 1.6.7
gem install jruby-jars -v 1.6.7 gem uninstall jruby-jars -v 1.7.2
Finally, I can perform the warble and deploy the war. The issue was created successfully.