in reply to Re^2: How to interpret characters in Devel::Peek CUR
in thread How to interpret characters in Devel::Peek CUR
As I previously commented here, much depends on the way you set up the connection, and there is still room to play with server-side encodings:
I recently worked from perl on Linux with a MS SQL server database, and got the best results with FreeTDS:
my $dbh = DBI->connect ("dbi:ODBC:mssql_freetds", $username, $password +, \%dbi_attributes);$ cat ~/.odbc.ini [mssql_freetds] Description = My MS SQL database Driver = FreeTDS TDS version = 7.2 Trace = No Server = mysql.server.local Port = 1433 Database = DatabaseName User = UserName Password = PassWord Client Charset = UTF-8The biggest difference between FreeTDS and the MS ODBC driver is the return type of UUID field. The MS ODBC does not allow nested queries, whereas the FreeTDS driver does. So I used the ODBC driver to make a CSV dump of the database and the FreeTDS driver to actually work with the database.
For ODBC I did
my $dbh = DBI->connect ("dbi:ODBC:mssql_odbc", $username, $password, \ +%dbi_attributes);$ cat ~/.odbc.ini [mssql_odbc] Description = My MS SQL database Driver = ODBC Driver 17 for SQL Server Server = mysql.server.local Database = DatabaseName User = UserName Password = PassWord
Also make sure you put the fully qualified hostname in the server name. localhost will not work.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: How to interpret characters in Devel::Peek CUR
by ait (Hermit) on Jun 16, 2020 at 15:13 UTC |