
I have a problem with strings and unicode chars, when writing slq statements on Oracle ODBC driver through HSQL. I'm writing here because I suspect that a fix could come from writing 8 bit strings, if it is possible somehow. I'm sorry, the problem is very deep into it's context, and I know it's not easy to follow 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. I have UTF-8 bytes, coming from an UTF-8 source (a web browser), and I

"Santoemma Enrico"
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
participants (2)
-
Ketil Malde
-
Santoemma Enrico