[webkit-reviews] review denied: [Bug 13415] Add UTF-32 support for html/xml documents : [Attachment 14220] a new patch with updated test cases

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 1 01:32:17 PDT 2007


Alexey Proskuryakov <ap at webkit.org> has denied Jungshik Shin
<jungshik.shin at gmail.com>'s request for review:
Bug 13415: Add UTF-32 support for html/xml documents
http://bugs.webkit.org/show_bug.cgi?id=13415

Attachment 14220: a new patch with updated test cases
http://bugs.webkit.org/attachment.cgi?id=14220&action=edit

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
r- for now, but the patch looks really good to me!

+    unsigned char c3 = buf1Len ? (--buf1Len, *buf1++) : buf2Len ? (--buf2Len,
*buf2++) : 0;
+    unsigned char c4 = buf2Len ? (--buf2Len, *buf2++) : 0;
...
+    if (c1 == 0xFF && c2 == 0xFE) {
+	 if (c3 != 0 || c4 != 0) 
+	     encodingConsideringBOM = &UTF16LittleEndianEncoding();
+	 else 
+	     encodingConsideringBOM = &UTF32LittleEndianEncoding();
+    }

You need to check why c3 and c4 are zero - if there are only two bytes
available yet, it may be too early to assume UTF-32.

     else if (numBufferedBytes + length <= sizeof(m_bufferedBytes) && !flush) {

	 // Continue to look for the BOM.

I believe m_bufferedBytes size should be increased to three bytes, now that we
deal with 4-byte BOMs.



More information about the webkit-reviews mailing list