Sven Koesling wrote:
> Hello Tor, the enconding - hint works perfectly, thank You very much! 
> What leads me to the question why rails 1.9 interprets files as us-ascii 
> - is this a good idea?

If I understand correctly, this is more of a core Ruby 1.9 issue than a 
Rails issue.  Ruby 1.9 changed its encoding handling significantly -- 
probably for the better, but it *is* more complex than 1.8, from what I 
understand.  (Take this with a grain of salt.  I haven't used 1.9 yet.)

> 
> And hello Marnen, it was just an example, I came across when I tried to 
> find an error in my application. I was working on the controller and 
> just needed an array. But as I am a beginner I am absolutely sure I 
> would have left things like that  in the controller instead of putting 
> them where they belong. So thank You very much too for reminding me.
> 
> But no matter if I put my array in the controller or model I need the # 
> encoding: utf-8 line.

Right.  If it comes from the DB, you don't, at least not that way.  In 
that case, you need to make sure your DB encoding is correct.

> 
> Conclusion for all non-US-collegues: The encoding problem often happens, 
> when it comes to notices or error-messages I want to show to the user. 
> Even if I know that my application will be in german it's worth it to 
> leave those messages in english and use the localization-files (in my 
> case de.yml) for the text with special character encodings.

That's true, but for reasons that have little to do with encoding, and 
more with application structure.

(Of course, I believe that all text and source code files should be 
UTF-8 anyway.)

> 
> Thanks again, lesson learned :-)
> greetings
> Sven

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to