Wednesday, March 7, 2012

[Rails] Charset encoding issue

I am working with an SQL Server database on a windows server with collation
SQL_Latin1_General_CP1_CI_AS

When I go to the rails console on the Linux server with the app I get
=> "Rodríguez, César"

To try to isolate the problem in my controller I tried render :text =>

but on the browser I am seeing

Rodr?guez, C?sar

I believe this is an encoding issue, but I don't know how to
resolve.(and Google + Stackoverflow are failing me) Given that the
source data can't be changed, what do I need to do on the rails side
to get the text to render properly?

On Chrome I have tried to manually change the encoding and no matter
which I select I can't get the text to render correctly.

Also, why would it render correctly on the console?

Thanks,
Noel

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate