Project

General

Profile

Foreign letters gives "Internal error"

Added by alf olsen over 14 years ago

Hi,

I'm adding a user who has a last name containing a Norwegian character "ø". This throws an "internal error".

Is there any way to solve this?

Alf


Replies (6)

RE: Foreign letters gives "Internal error" - Added by alf olsen over 14 years ago

Hello, I still have this problem. Did anyone experience the same, or more important know how to fix it?

RE: Foreign letters gives "Internal error" - Added by Felix Schäfer over 14 years ago

Please tell us more about your setup (redmine, rails, ruby versions, and so on).

RE: Foreign letters gives "Internal error" - Added by alf olsen over 14 years ago

Yes, sorry I didn't do that in my first post.

I'm running:

- Redmine 0.9.3.stable (MySQL)
- Rails 2.3.5
- ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
- MySQL 5.0.51 (InnoDB + all tables utf8_general_ci)
- Linux version 2.6.18-6-686 (Debian 2.6.18.dfsg.1-18etch1)

Redmine is running via webrick on port 3000.

I tried to add a new user now to reconstruct the problem, and this is what is outputed by webrick:

------------- paste start --------------------------------------------------
ActionView::TemplateError (incompatible character encodings: ASCII-8BIT and UTF-8) on line #9 of app/views/users/_form.rhtml:
6: <p><%= f.text_field :firstname, :required => true ></p>
7: <p><
= f.text_field :lastname, :required => true ></p>
8: <p><
= f.text_field :mail, :required => true ></p>
9: <p><
= f.select :language, lang_options_for_select ></p>
10: <
if Setting.openid? >
11: <p><
= f.text_field :identity_url ></p>
12: <
end %>

app/views/users/_form.rhtml:9:in `_run_rhtml_app47views47users47_form46rhtml_locals_f_form_object'
app/views/users/add.rhtml:4:in `block in _run_rhtml_app47views47users47add46rhtml'
app/helpers/application_helper.rb:614:in `labelled_tabular_form_for'
app/views/users/add.rhtml:3:in `_run_rhtml_app47views47users47add46rhtml'
&lt;internal:prelude&gt;:8:in `synchronize'
/usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Rendering /data/www/redmine/public/500.html (500 Internal Server Error)
------------- paste end --------------------------------------------------

I'm guessing redmine isn't using utf-8 or something in that direction. Any ideas how to resolve this? Should be a common problem, but I couldnt find the answer.

Thanks!

RE: Foreign letters gives "Internal error" - Added by Felix Schäfer over 14 years ago

Redmine and/or the rails version it uses (can't remember which one is to blame, but that doesn't make the problem go away anyway) is not compatible with ruby 1.9, you have to stick with 1.8 for that installation. You can look up which version of what are supported on RedmineInstall, I think there also is a ticket somewhere for ruby 1.9 support, follow that to know when you can use ruby 1.9.

The essence of the problem is that ruby 1.9 changed the way it handles/encodes strings, which breaks stuff when both sides (ruby on the one hand, redmine/rails on the other) don't talk the same encoding.

RE: Foreign letters gives "Internal error" - Added by alf olsen over 14 years ago

Thanks a lot, then at least I know there is nothing I can do. I think we can live with not using our æøå letters, its actually easier for me than reinstall the whole thing (which took me quite some time).

Hope they fix this!

RE: Foreign letters gives "Internal error" - Added by Felix Schäfer over 14 years ago

You'd only need to downgrade ruby to 1.8, and possibly reinstall gems that have binary components (especially the mysql gem), shouldn't be too much of a hassle.

    (1-6/6)