Re: Sybase: Charset conversion
Sebastian Podjasek <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Organization | morenet.pl |
| Message-ID | <1259225594.17265.213.camel@seba-laptop> |
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? -- Sebastian Podjasek <[email protected]> morenet.pl