Problem with DB and Char size
Ketil Malde
ketil+haskell at ii.uib.no
Thu Jan 27 12:17:48 EST 2005
"Santoemma Enrico" <enrico.santoemma at beta80group.it> writes:
> The problem is: Oracle ODBC driver expects, at least under Windows,
> UCS-2 strings. Then, if the DB is set to UTF-8, it converts the string
> into UTF-8. I'm using HSQL to access ODBC.
Isn't UCS-2 the old 16-bit Unicode representation? So that converting
from ASCII simply involves interspersing zero-bytes? And converting
from a String (of Unicode codepoints from a subset of UCS-2), can be
done with a divMod operation. So if you can generate the correct
string of bytes this way, withCString should work, shouldn't it?
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Glasgow-haskell-users
mailing list