[freetds] How to Turn Off Character Conversion Failed Warnings

Eli Finkelshteyn vengeanceofalf at gmail.com
Thu Nov 11 15:52:29 EST 2010


Hi Folks,
I'm using FreeTDS with Perl and DBD::Sybase to connect to a MSSQL 2008
server. Normally, this is well and good, but today I noticed that someone
thought it would be a good idea to write cp1252 data to a char column I'm
selecting from. This promptly made FreeTDS and Perl fail with the error: "*Some
character(s) could not be converted into client's character set.
Unconverted bytes were changed to question marks ('?')*"

Now, that's completely fine, and I'm willing to live with the question
marks. The problem is that this warning is read as an error by Perl and
breaks my code!

Googling around, I found that I can use " * set * * char_convert on with no
error*" on a normal Sybase  server to ignore this and go on with the code.
Is there some equivalent I can send to FreeTDS, or DBD::Sybase (perhaps a
setting in freetds.conf?) to do the same? I would find that immensely
helpful!

Thanks and Regards,
Eli



More information about the FreeTDS mailing list