Confira
-
EEEEEEEEEEEEEE? como assim B-pop? Vocês ficaram sabendo da novidade? Vish! Será se essa moda pega?! Yoo mina-san! Nesse post q...
-
Yoooooooooooo minasan! Para os viciados em Slender Man deixo um vÃdeo que é suuuuuuuuuuper bom! Vocês não podem perder! Os ...
-
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...
-
Yoooooo minasan! Quanto tempo hein! ><' Bom acho que vocês perceberam que o conteúdo do blog estava se duplicando não é? ...
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