Perl TDS character sets

Posted by skiphoppy on Stack Overflow See other posts from Stack Overflow or by skiphoppy
Published on 2010-05-04T21:24:40Z Indexed on 2010/05/04 21:28 UTC
Read the original article Hit count: 368

Filed under:
|
|
|

I'm using the FreeTDS driver with DBD::Sybase, connecting to an MS SQL Server. When I query certain values of certain records, I get this error:

DBD::Sybase::st fetchrow_arrayref failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (9) NUMBER = (99)
Server , database 
Message String: WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?').

This seems to happen for records that contain special Windows character-set characters, such as curly quotes, copied and pasted from people's Outlook and Word messages.

Unfortunately, I do not have any control of this database; sanitizing the input on the way in is obviously the way to go, but is not available to me.

What FreeTDS settings do I need to change to be able to successfully query these records?

© Stack Overflow or respective owner

Related posts about perl

Related posts about dbi