Frank Kintrup
Member²
Hi,
I have a seemingly trivial problem, but the solution eludes me so far...
Delphi 2010, Oracle 10g (UTF8), DOA 4.1.2
I have a PAnsiChar buffer containing UTF8 data. With Delphi 2007 I just used
oLOBLocator.Write(pBuffer^, iWrite);
to write the contents to the database. With Delphi 2010 and 4.1.2 this no longer works, the result stored in the database is garbage. Using a hex dump of the stored data I see that the stored *bytes* itself are correct, but the database interpreted every two of them as one unicode character, which does not work very well on XML data ;-)
Is there a way to force DOA to accept the data as UTF8 or do I have to convert it to a wide string first?
Frank
I have a seemingly trivial problem, but the solution eludes me so far...
Delphi 2010, Oracle 10g (UTF8), DOA 4.1.2
I have a PAnsiChar buffer containing UTF8 data. With Delphi 2007 I just used
oLOBLocator.Write(pBuffer^, iWrite);
to write the contents to the database. With Delphi 2010 and 4.1.2 this no longer works, the result stored in the database is garbage. Using a hex dump of the stored data I see that the stored *bytes* itself are correct, but the database interpreted every two of them as one unicode character, which does not work very well on XML data ;-)
Is there a way to force DOA to accept the data as UTF8 or do I have to convert it to a wide string first?
Frank