Skip to Content.
Sympa Menu

freetds - R: [freetds] Charset conversion Polish

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "FlavianoMa" <FlavianoMa.software AT teseo.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: R: [freetds] Charset conversion Polish
  • Date: Fri, 6 May 2005 18:34:47 +0200


> -----Messaggio originale-----
> Da: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] Per conto di
> ZIGLIO, Frediano, VF-IT
> Inviato: venerdì 6 maggio 2005 17.23
> A: FreeTDS Development Group
> Oggetto: RE: [freetds] Charset conversion Polish
>
> >
> > In my system is not available the iconv library, so I modified the
> > built-in iconv substitute in FreeTDS to accept different charset (
> > CP1250, CP1254, CP1256, CP1251 ).
> > Now when I read data from the SQL Server I receive data correctly.
> > When I write on the server, I write the correct Unicode buffer ( I
> > checked on freetds.log), but the server convert my character before
> > save on DB, so after if I'll read the same buffer it will
> be different
> > ( checked on freetds.log).
> >
> > So if I write a polish char to SQL Server installed in US WinXp it
> > doesn't work.
> > If I write a polish char to SQL Server installed in Polish WinXp it
> > works.
> >
> > It seems like if I need to specify to the Server the charset that I
> > using on client.
> >
> > Why?
> >
> > Thanks
> > Flaviano
> >
>
> Accept different charset means that you coded conversion for
> all your required charset? Then it should work. Have you
> tried to compile and use libiconv? Do you post data using
> normal sql statement or prepared one?
> Does the server reply correctly? Do char column have proper charset?


I modified FreeTDS tds_rep_iconv(...) in ICONV2.C using source code gets from
libiconv. UNICODE.C is a source that I use to join the #include of libiconv
with source of FreeTDS.
The conversion in the client machine works correctly.

But , as you can see in the freetds.log attached, I UPDATE on the server a
field with a char (in CP1250 0xB3 that in UCS-2LE is 0x4201 ), but after the
relative SELECT from the server don't return the same char but 0x6C00.

The column in the server is nvarchar.


Thanks
Flaviano

Flaviano Maricotti
Software Department

----------------------------------------------------------------------------------------------

TESEO spa via Agnelli 49 63023 FERMO (AP) ITALY Tel. +39 0734 628818
Fax. +39 0734 628816

software AT teseo.com FlavianoMa.software AT teseo.com


DISCLAIMER. This electronic mail transmission may contain legally priviledge
and/or confidential information. Do not read this if you are not the
person(s) named. Any use, distribution, copying or disclosure by any other
person is stricly prohibited. If you received this trasmission in error
destroy the original transmission and its attachments without reading or
saving in any manner.
----------------------------------------------------------------------------------------------



Attachment: FREETDS.LOG
Description: FREETDS.LOG

Attachment: iconv2.c
Description: iconv2.c

Attachment: UNICODE.C
Description: UNICODE.C




Archive powered by MHonArc 2.6.24.

Top of Page