Hello, I wrote a RoR app on OSX and SQL Server. The DB uses SQL_Latin1, so I use Iconv to convert to UNICODE every dynamic text I show on the pages (Iconv.conv(''utf-8'', ''iso-8859-1'', string)). That''s been working fine until I deployed the app on a debian box. Since then, the accents are shown as question marks, and I don''t know why. The odbc drivers used are the very same (as explained in http://wiki.rubyonrails.com/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnLinux) and locales are set to UTF-8 on both machines. Querying with isql I get the right string, but not using the rails console. I''d apreciate any clue. Thanks in advance. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
César Amador wrote:> I wrote a RoR app on OSX and SQL Server. The DB uses SQL_Latin1, so I > use Iconv to convert to UNICODE every dynamic text I show on the pages > (Iconv.conv(''utf-8'', ''iso-8859-1'', string)). That''s been working fine > until I deployed the app on a debian box. Since then, the accents are > shown as question marks, and I don''t know why.It sounds like the same issue I had. Basically FreeTDS defaults to converting any 8 bit character (or something like that) to ''?'' unless you tell it not to. You should be able to fix your issue by adding: client charset = ISO8859-1 to your connection settings in your freetds.conf -- Jakob Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > You should be able to fix your issue by adding: > > client charset = ISO8859-1 > > to your connection settings in your freetds.confThank you very much, Jakob, it solved the problem. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---