Xml read fails when xml uses windows code page 1252 instead of utf8
The next generation XML library for Pascal (Delphi, FPC, Lazarus)
Brought to you by:
ondrejpokorny
Hi
We've just started using OXML and have found it great so far - significantly faster than NativeXML :-)
We have encountered a problem parsing an XML that specifies Windows-1252 encoding. Delphi XE6 throws an encoding exception that causes it to fail loading the stream.
I had a quick look at the code and added a simple exception catch to work around the problem.
--- OTextReadWrite.pas (revision 7872)
+++ OTextReadWrite.pas (working copy)
@@ -656,11 +656,21 @@
Inc(fStreamPosition, xReadBytes+xUTF8Inc);
SetLength(xBuffer, xReadBytes+xUTF8Inc);
You've been using an old version of OXml. This bug has already been fixed. Please update OXml.
Last edit: Ondrej Pokorny 2014-11-27
Sorry about that, I had a quick look at the sourceforge code before raising the ticket and it looked the same around there. I'll try a checkout instead of the downloaded version. Thanks.
No problem. The SVN version should now be the same as the downloaded version (1.2).
Please confirm that the bug has been fixed (I hope I haven't been wrong about that).
I'm not encountering the error so I think it's fine, thanks.