Re: Sybase: Charset conversion
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
2009/11/26 Sebastian Podjasek <[email protected]>: > Dnia 2009-11-26, czw o godzinie 09:22 +0100, Frediano Ziglio pisze: >> 2009/11/26 Frediano Ziglio <[email protected]>: >> > >> > I tried this test >> > >> > create table #tmp1(a univarchar(10)) >> > insert into #tmp1 values(u&'\0041\0141') >> > select * from #tmp1 >> > >> >> easier >> >> select cast(u&'\0041\0141' as univarchar(10)) >> >> > I'm sorry to say but my Sybase 15 returns data in little endian format >> > so it seems a problem of your database. It can be possible however >> > that is a problem inserting data. > > I get only errors... > >> seba:~$ tsql -S x -U x -P x >> locale is "pl_PL.UTF-8" >> locale charset is "UTF-8" >> 1> select cast(u&'\0041\0141' as univarchar(10)) >> 2> go >> Msg 102, Level 15, State 0, Server , Line 0 >> SQL Anywhere Error -131: Syntax error near 'univarchar' on line 1 >> 1> create table #tmp1(a univarchar(10)) >> 2> insert into #tmp1 values(u&'\0041\0141') >> 3> select * from #tmp1 >> 4> go >> Msg 102, Level 15, State 0, Server , Line 0 >> SQL Anywhere Error -131: Syntax error near 'univarchar' on line 1 > > > When I use ODBC on Windows client everything is OK. > > Can I somehow force FreeTDS to use UC2-BE, instead of autodetection? > > Does select u&'\0041\0141' works ?? It would be interesting seeing an entire network capture from Windows... can you setup a test server and/or account and send this kind of capture (keep in mind that can contain server names, ips, user, password and other sensitive data). freddy77