This project is archived and is in readonly mode.
I18n incompatible character encodings: UTF-8 and US-ASCII
-
qoobaa
The problem can be easily solved by defining custom "activerecord.errors.full_messages.format" key in your translations:
de: activerecord: errors: full_messages: format: "{{attribute}} {{message}}"I don't have time to make a patch right now, but it'd be really simple - all you need is to add magic comment with utf-8 encoding at the beginning of validations.rb file.
-
Lailson Bandeira
For me, none of these solutions worked in Rails 3:
* Add the "activerecord.errors.full_messages.format" key on translation file * Add # coding: utf-8 in validations.rb I'm using a portuguese translation and Rails 3.0.0beta0 on Ruby 1.9.1p378 on Mac OS X 10.6. -
Lailson Bandeira
Let me format this:
For me, none of these solutions worked in Rails 3:
- Add the "activerecord.errors.full_messages.format" key on translation file
- Add # coding: utf-8 in validations.rb
I'm using a portuguese translation and Rails 3.0.0beta0 on Ruby 1.9.1p378 on Mac OS X 10.6.
-
Lailson Bandeira
Sorry, I just found out there is already the ticket #3941 "invalid byte sequence in US-ASCII" error for UTF-8 localized messages for this problem on Rails 3. And it just got solved!
-
Rizwan Reza
- State changed from new to resolved
-
Priit Tamboom
- Assigned user set to Rizwan Reza
Actually it's only resolved for Ralis3 but it's not solved for 2.3.8 or 2-3-stable branch and I just got bitten by it. It got some hours debugging for me to figure out where US-ASCII string comes in.
Anyhow, I made micro-patch against 2-3-stable and this problem should be solved now.
-
Priit Tamboom
- Title changed from I18n incompatible character encodings: UTF-8 and US-ASCII to [PATCH] I18n incompatible character encodings: UTF-8 and US-ASCII
-
Santiago Pastorino
- Milestone changed from 2.3.6 to 2.3.9
- State changed from resolved to open
-
Rizwan Reza
- Assigned user cleared.
-
Jeff Kreeftmeijer
- Title changed from [PATCH] I18n incompatible character encodings: UTF-8 and US-ASCII to I18n incompatible character encodings: UTF-8 and US-ASCII
- Tag set to i18n, patch
Using the "patch" tag instead of prefixing the ticket title with "[PATCH]" to make sure patched tickets end up in the open patches bin. :)
-
Santiago Pastorino
- Assigned user set to José Valim
