Re: charset problem with Sybase on SunOS server and Ubuntu client

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
[email protected] wrote:
> 
> In freetds.conf we have:
> 
> [$SERVER_NAME]
> host = $IP_ADDRESS
> port = $PORT
> tds version = 5.0
> 
> Upon running the script, we get the errors:
> 
> Cannot find the requested character set in Syscharsets: name = 'UTF-8'.
> No conversions will be done.
> Changed data
> Changed database context to 'master'.

I think this was fixed long ago.  If you have a problem with 0.82, I'll
look into it.  

Sybase has a "server makes right" policy: the client sends the server its
preferred encoding in the login packet, and the server uses that encoding
for all communications with that client for that connection.  

However, the *name* -- the literal string used to denote the encoding --
is determined by Sybase, and it doesn't match, say, what GNU uses for
their iconv library.  We have a table to convert the canonical name to
Sybase's:

$ grep -i utf src/tds/sybase_character_sets.h 
        , {             "UTF-8", "utf8"          }

The error message you're seeing comes from the server.  It means Sybase
doesn't recognize "UTF-8" as the name of any encoding.  The login packet
should send 'utf8'.  

You might be able to get away with setting  client charset = utf8, but
you're probably better off upgrading to 0.82.  

HTH.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.