Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS and SQL Server 2008 UTF-16 characters

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Burkhard Meier" <Burkhard AT habmalnefrage.de>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] FreeTDS and SQL Server 2008 UTF-16 characters
  • Date: Fri, 24 Sep 2010 10:13:29 +0200

Hi James,

>
> I have a suggestion for a hack. If you're right and I'm right, it might
> work.
>
> In src/tds/iconv.c, the string constant "UCS-2LE" appears 4 times. Change
> them to "UTF-16LE". Recompile. Make sure you're using GNU libiconv. Run
> your test. Watch for smoke.

So far I can say it is working very well! Unicode characters outside the BMP
are now correctly converted to UTF-16 and back to UTF-8. The characters in
the UCS-2 range still seem to work too.

>
> If UTF-16 really is a superset of UCS-2, it should Just Work. That change
> doesn't fake anything; it just treats as UTF-16 what would otherwise be
> regarded as UCS-2. If it works, please update the comments and the
> variable names (and for extra credit, the documentation), post your patch
> and call it a day.

I will do that.

Thank you very much for your help!

Best Regards,
Burkhard


--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl




Archive powered by MHonArc 2.6.24.

Top of Page