I have an MS SQL Server 2008 Database, from which I am fetching data using perl DBD::Sybase module. But there are some special characters in the DB, like the Copyright symbol, Trademark symbol etc., which are not getting imported properly. Perl seems to change all of these special characters to a Question mark character. Is there a way to fix this?
I have tried specifying charset=utf8
in the connection string. The doc mentions a syb_enable_utf8 (bool)
setting, but whenever I try that, I get an error:
Can't locate object method "syb_enable_utf8" via package "DBI::db"
One solution I found was this:
Then, wherever you are writing data to a file or anywhere else, use
Encode::encode_utf8($data);
where
$data
is the column/value which you have fetched from MSSQL.