Skip to Content.
Sympa Menu

freetds - Re: [freetds] UTF-8 conversion

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Eddie Gieze <egieze AT techno-design.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] UTF-8 conversion
  • Date: Fri, 22 Apr 2005 16:26:15 +0200

Dear List,

I've been trying to solve this problem today but unfortunately i wasn't succesful. I was worried that somehow my application was causing the problem so i made a new one in XCode which only makes a connection, makes a query and then closes the connection. However this didn't change anything.

Data i should be getting:

74 C4 93 C5 A0 74 00 OS X character palette - utf-8
0074 0113 0160 0074 OS X character palette - unicode

Data i'm getting:

74 C3 84 E2 80 9C C3 85 C2 A0 74 00 XCode - SQLGetData
74 C3 84 E2 80 9C C3 85 C2 A0 74 00 XCode - SQLBindCol

I'm getting the strange feeling that somehow my data is getting converted to UTF-8 twice?

I've included my freetds.log.

Here are my libiconv tests:

perl -e'print "\xC3\x84"' | iconv -t ucs-2le -f utf-8 | hexdump -C
C4 00
perl -e'print "\xE2\x80\x9C"' | iconv -t ucs-2le -f utf-8 | hexdump -C
1C 20
perl -e'print "\xC3\x85"' | iconv -t ucs-2le -f utf-8 | hexdump -C
C5 00
perl -e'print "\xC2\xA0"' | iconv -t ucs-2le -f utf-8 | hexdump -C
A0 00

perl -e'print "\xC5\xA0"' | iconv -t ucs-2le -f utf-8 | hexdump -C
60 01
perl -e'print "\x60\x1"' | iconv -f ucs-2le -t utf-8 | hexdump -C
C5 A0

perl -e'print "\xC4\x93"' | iconv -t ucs-2le -f utf-8 | hexdump -C
13 01
perl -e'print "\x13\x1"' | iconv -f ucs-2le -t utf-8 | hexdump -C
C4 93

Configuring using --without-libiconv does not make a difference.

I wonder what you guys think of this. I think maybe i should simply stick to UCS-2 and do the UTF-8 conversion myself.

I know the data in the database is correct because when using an ODBC-ODBC bridge or when viewing the data using ASP and IIS it is displayed correctly.

Attachment: freetds.log
Description: Binary data



Kind Regards,
Eddie Gieze


Archive powered by MHonArc 2.6.24.

Top of Page