Re: unicode via DBI on linux to sql server 2005?



bugbear wrote:
I'm not really sure which forum to post this on!

I am attempting to retrieve data from an sql server 2005 database, hosted,
store and manipulated on a Windows box.

My code is running on a Linux box, and I have been given
read-only access to the DB server.

Connection via DBI is working well, but I am failing
to extract unicode data from the DB, which I understand
from googling is stored internally as UCS2.
(I can get ascii data and numeric data fine)

I am using perl, DBI, and the DBD::Sybase driver.

So - has anyone retrieved "international" data
in the same (or similar) circumstances as this?

Ye - me! It turns out the client character
set, into which the connection attempts to encode
the data, is NOT set from the DBI connection string

http://search.cpan.org/~mewp/DBD-Sybase-1.08/Sybase.pm

i.e. charset=utf-8

but in the freedts.conf file, which is part of the connection.

http://www.freetds.org/userguide/freetdsconf.htm

as the "client charset" parameter.

So I added

client charset = UTF8

And my code did what I needed.

Hoping this helps someone else...

BugBear
.



Relevant Pages

  • unicode via DBI on linux to sql server 2005?
    ... I am attempting to retrieve data from an sql server 2005 database, hosted, ... store and manipulated on a Windows box. ... I am using perl, DBI, and the DBD::Sybase driver. ...
    (comp.lang.perl.misc)
  • RE: SQL Server End User Problem
    ... > connection to use TCP/IP for the connection so that the SQL server login will ... The default network library for SQL server is Named Pipes which uses ... >> connection statement would be in the web.config file (with a generic userid ... >> Server using the generic user id and password and retrieve data. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: SQL Server End User Problem
    ... > connection to use TCP/IP for the connection so that the SQL server login will ... The default network library for SQL server is Named Pipes which uses ... >> connection statement would be in the web.config file (with a generic userid ... >> Server using the generic user id and password and retrieve data. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Error "SQL Server does not allow remote connections"
    ... The application could not connect to the sql server db. ... network is blocking the connection. ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 ... integratedSecurity, SqlConnection owningObject) +737554 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Connection from remote computer to network SQL Server
    ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
    (microsoft.public.access.adp.sqlserver)