Confira
-
Yooo galerinha! tudo bem? Hoje venho compartilhar contigo um script que venho desenvolvendo para conectar um banco de dados com o FreeTDS e ...
-
U.U Sabem de uma coisa? Ontem foi aniversário de 3 meses de blog e eu não fiz nada... e.e' Arrrrrrrgh!!! Bom, mas estou feliz...
-
Olá Minna! Estou voltando hoje com um post muito legal! Dá uma olhada nos tops de todos os tempos que encontrei nesse compilado <3! PS: ...
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
Assinar:
Postar comentários (Atom)

Nenhum comentário:
Postar um comentário