libxml2 r3700 - in trunk: . result/valid test/valid test/valid/dtds
- From: veillard svn gnome org
- To: svn-commits-list gnome org
- Subject: libxml2 r3700 - in trunk: . result/valid test/valid test/valid/dtds
- Date: Thu, 6 Mar 2008 14:37:11 +0000 (GMT)
Author: veillard
Date: Thu Mar 6 14:37:10 2008
New Revision: 3700
URL: http://svn.gnome.org/viewvc/libxml2?rev=3700&view=rev
Log:
* encoding.c: poblem with encoding detection for UTF-16 reported by
Ashwin and found by Bill
* test/valid/dtds/utf16b.ent test/valid/dtds/utf16l.ent
test/valid/UTF16Entity.xml result/valid/UTF16Entity.xml*: added
the example to the regression tests
Daniel
Added:
trunk/result/valid/UTF16Entity.xml
trunk/result/valid/UTF16Entity.xml.err
trunk/test/valid/UTF16Entity.xml
trunk/test/valid/dtds/utf16b.ent (contents, props changed)
trunk/test/valid/dtds/utf16l.ent (contents, props changed)
Modified:
trunk/ChangeLog
trunk/encoding.c
Modified: trunk/encoding.c
==============================================================================
--- trunk/encoding.c (original)
+++ trunk/encoding.c Thu Mar 6 14:37:10 2008
@@ -1768,9 +1768,10 @@
* echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
* 45 chars should be sufficient to reach the end of the encoding
* declaration without going too far inside the document content.
+ * on UTF-16 this means 90bytes, on UCS4 this means 180
*/
- if (toconv > 45)
- toconv = 45;
+ if (toconv > 180)
+ toconv = 180;
if (toconv * 2 >= written) {
xmlBufferGrow(out, toconv);
written = out->size - out->use - 1;
Added: trunk/result/valid/UTF16Entity.xml
==============================================================================
--- (empty file)
+++ trunk/result/valid/UTF16Entity.xml Thu Mar 6 14:37:10 2008
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE foo [
+<!ELEMENT foo (root)*>
+<!ELEMENT root EMPTY>
+<!ENTITY utf16b SYSTEM "dtds/utf16b.ent">
+<!ENTITY utf16l SYSTEM "dtds/utf16l.ent">
+]>
+<foo> &utf16b; &utf16l; </foo>
Added: trunk/result/valid/UTF16Entity.xml.err
==============================================================================
Added: trunk/test/valid/UTF16Entity.xml
==============================================================================
--- (empty file)
+++ trunk/test/valid/UTF16Entity.xml Thu Mar 6 14:37:10 2008
@@ -0,0 +1,8 @@
+<!DOCTYPE foo [
+<!ELEMENT foo (root*)>
+<!ELEMENT root EMPTY>
+<!ENTITY utf16b SYSTEM "dtds/utf16b.ent">
+<!ENTITY utf16l SYSTEM "dtds/utf16l.ent">
+]>
+
+<foo> &utf16b; &utf16l; </foo>
Added: trunk/test/valid/dtds/utf16b.ent
==============================================================================
Binary file. No diff available.
Added: trunk/test/valid/dtds/utf16l.ent
==============================================================================
Binary file. No diff available.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]