Re: Sybase: Charset conversion
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Sebastian Podjasek wrote: > I'm trying to access Sybase DB from my Perl script and currently > I have some problems with FreeTDS characters conversion. From > what I've seen FreeTDS detects that server is using UCS-2LE and > tries to convert from it to UTF-8. As a result it produces some > strange "Chinese characters", but when I do convert that string > back to UCS-2LE, and then convert it as UCS-2BE (instead of > little endian) to UTF-8 - I get what I want. It could be broken. It sounds like it. Sybase has a server-makes-right policy for character conversion. In theory, FreeTDS shouldn't have to do any conversion at all. It merely needs to tell the server what encoding to use, and the sever will use that encoding. In fact, I'm not sure we do that correctly. What does the top of your TDSDUMP log say about the conversions? What encoding do you think the server expects, and what does the client want? --jkl