0
votes

I allready have problems with utf-8 encoding in my ror app ...

some are fixed now. But some are still left.

I have now an utf-8 force in my layout

But still have problems with German special chars (ä, ö, ü). In my /config/locales/de.yml I have lots of them. In the File they look nice :) tested with rubymine and nano.

But when I start the app it crashes. The yml is encoded in utf-8 ..

I've also tried this:

f\xC3\xBCr --> should be für

always got this:

incompatible character encodings: UTF-8 and ASCII-8BIT

Does anyone have some hints for me?

enter image description here

1

1 Answers

1
votes

It seems to me that the encoding of the app is set to UTF-8.

Are you sure that RubyMine saves your file with UTF-8? You can add # encoding: UTF-8 to the top of your files to assure it is set. (Not sure if this works in .yml)

Edit: If you have pasted any text into the file it may still contain wrong encoding.

  • Move the de.yml out of the project.
  • Create a new file de.yml

    de: first_translation: Ich möchten ein bisschen Müsli

If this works, then you need to rewrite everything from the old file, no copying!