Confira
-
Yoooooooooooo! Tudo bem minasan? Estou mesmo muito sumida... talvez seja essa correria do dia a dia ou então o amadurecimento pra ...
Post Page Advertisement [Top]
Error on UTF-8 MSSQL windows FreeTDS Linux
Hi guys, whats up?
Today I came with a nice approach to solve the issue that was giving us a really good headache!
We have a connection string on our linux server that connects to the MSSQL in an external machine.
For that we had a connection string similar to:
$dsn="odbc:DRIVER=freetds;SERVER=$serverName;PORT=$port;DATABASE=$dbName;"
After look everywhere and even on the FreeTDS documentation we found an extended option that it is resumed to
ClientCharset=UTF-8;ServerCharset=CP1252
so the final connection string is something like:
$dsn="odbc:DRIVER=freetds;SERVER=$serverName;PORT=$port;DATABASE=$dbName;ClientCharset=UTF-8;ServerCharset=CP1252";
Thanks for the StackOverflow thread
https://stackoverflow.com/questions/37141342/character-set-mismatch-on-linux-with-odbc-to-sql-server
they saved my day!
So that is all for now!
thank you folks.
Midori

Hey there, We are Blossom Themes! We are trying to provide you the new way to look and use the blogger templates. Our designers are working hard and pushing the boundaries of possibilities to widen the horizon of the regular templates and provide high quality blogger templates to all hardworking bloggers!
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário