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
Peak Obsession)
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.
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 S. - http://mentalized.net
You should be able to fix your issue by adding:
client charset = ISO8859-1
to your connection settings in your freetds.conf
Thank you very much, Jakob,
it solved the problem.