[fpc-devel] Oracle CLOB and UTF8
LacaK
lacak at zoznam.sk
Wed Sep 6 14:48:21 CEST 2017
Hi,
as far as I remember I have problems (when I have implemented support
for CLOBs) you describe as well.
I do not have access to Oracle DB anymore so I can not fix it, worse I
am not aware of easy way how to get from OCI API information about byte
length (and connection character set) ... I have never used Oracle DB
except for one period when I have fixed some errors found in our db test
suite.
There are some API functions like OCILobCharSetId(), which probably can
be used to guess "character length" based on known character set ids.
If you are aware of working solution, please submit bug report and
attach patch ...
Thanks
-Laco.
> 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
>
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170906/496c6b4e/attachment.html>
More information about the fpc-devel
mailing list