Re: FreeTDS and SQL Server 2008 UTF-16 characters
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Hi Burkhard, > From all that I learned about this, it seems it would be safe > intepreting the UCS-2 characters as UTF-16 ... > I would appreciate your help with such a change... for sure I can help > with testing it. 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. 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. HTH. --jkl