[fpc-devel] Oracle CLOB and UTF8

Dave Connolly menounsef at gmail.com
Wed Sep 6 14:13:38 CEST 2017


Hi all,

I've got a database with a CLOB column containing "abcdefgáéíóúøå"

I'm using the TOracleConnection to select this data and it comes back
corrupted "abcdefgáéí�"

This only happens when using a CLOB. If I put the same data in a VARCHAR2
or NVARCHAR2 the results are correct.

The OCILobGetLength in the procedure TOracleConnection.LoadBlobIntoBuffer
returns 14. This is the number of characters in the string, but it is not
taking the double-byte characters into account. The length in the case
should be 21.

Is this a known issue?

Many thanks,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170906/c9d98f9f/attachment.html>


More information about the fpc-devel mailing list