Project

General

Profile

Invalid byte sequence in UTF-8 error for anything but ASCII

Added by Nikola Kotur over 14 years ago

Using version 0.8 Stable I encounter redMine 500 Internal error whenever somebody enters non-ASCII characters (for example, Serbian specific šćđ, etc).

This is what log says:

Processing ApplicationController#diff (for 212.200.238.6 at 2009-11-25 10:23:01) [GET]
Parameters: {"controller"=>"repositories", "action"=>"diff", "id"=>"XXXXXXXX", "rev"=>"05e3bef2a586e8eed76a4b0a3e187596150923bd"}

ArgumentError (invalid byte sequence in UTF-8):
<internal:prelude>:8:in `synchronize'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Rendering /opt/redmine/public/500.html (500 Internal Server Error)

It doesn't matter what controller or action is, it happens on issues, wiki, forums, everything.

Is there a known workaround for this bug, or Redmine doesn't support UTF-8?

Please, help, I don't know Ruby, but I do like Redmine.


Replies (6)

RE: Invalid byte sequence in UTF-8 error for anything but ASCII - Added by Nikola Kotur over 14 years ago

Also, for what it's worth:

$ RAILS_ENV=production script/about
About your application's environment
Ruby version 1.9.1 (i686-linux)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.4
Active Record version 2.3.4
Active Resource version 2.3.4
Action Mailer version 2.3.4
Active Support version 2.3.4
Application root /opt/redmine
Environment production
Database adapter mysql
Database schema version 20091114105931

RE: Invalid byte sequence in UTF-8 error for anything but ASCII - Added by Andrew Chaika over 14 years ago

Rails and Redmine don't fully compatible with Ruby 1.9.1 because of new string implementation in it.

RE: Invalid byte sequence in UTF-8 error for anything but ASCII - Added by Nikola Kotur over 14 years ago

So, which version should I use?

Thanks for the reply.

RE: Invalid byte sequence in UTF-8 error for anything but ASCII - Added by Nikola Kotur about 14 years ago

Thank you, Andrew.

Installing Ruby 1.8.7 and than rebuilding all the gems solved my issue.

    (1-6/6)