Reviewed by Maciej.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8951
AtomicString hash corrupted by high-bit Latin-1
* fast/encoding/high-bit-latin1-expected.txt: Added.
* fast/encoding/high-bit-latin1.html: Added.
WebCore:
Reviewed by Maciej, tweaked by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8951
AtomicString hash corrupted by high-bit Latin-1
Test: fast/encoding/high-bit-latin1.html
* platform/AtomicString.cpp: (WebCore::CStringTranslator::equal): Use an
unsigned char local.
* platform/StringImpl.cpp: (WebCore::StringImpl::init): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14434
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-05-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Maciej.
+
+ - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8951
+ AtomicString hash corrupted by high-bit Latin-1
+
+ * fast/encoding/high-bit-latin1-expected.txt: Added.
+ * fast/encoding/high-bit-latin1.html: Added.
+
2006-05-17 Rob Buis <buis@kde.org>
Reviewed by Maciej.
--- /dev/null
+Test Latin-1 conversion to String
+
+PASS
+
+
--- /dev/null
+<html>
+<head>
+ <title></title>
+</head>
+<body>
+ <p>
+ Test Latin-1 conversion to String
+ </p>
+ <a id="t" à></a>
+ <p>
+ <script type="text/javascript">
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ document.write(document.getElementById("t").attributes[1].name == "\u00e0" ? "PASS" : "FAIL");
+ </script>
+ </p>
+</body>
+</html>
+2006-05-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Maciej, tweaked by Darin.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8951
+ AtomicString hash corrupted by high-bit Latin-1
+
+ Test: fast/encoding/high-bit-latin1.html
+
+ * platform/AtomicString.cpp: (WebCore::CStringTranslator::equal): Use an
+ unsigned char local.
+ * platform/StringImpl.cpp: (WebCore::StringImpl::init): Ditto.
+
2006-05-17 Rob Buis <buis@kde.org>
Reviewed by Maciej.
{
int length = r->length();
const UChar* d = r->characters();
- for (int i = 0; i != length; ++i)
- if (d[i] != s[i])
+ for (int i = 0; i != length; ++i) {
+ unsigned char c = s[i];
+ if (d[i] != c)
return false;
+ }
return s[length] == 0;
}
m_data = newUCharVector(m_length);
int i = m_length;
UChar* ptr = m_data;
- while (i--)
- *ptr++ = *str++;
+ while (i--) {
+ unsigned char c = *str++;
+ *ptr++ = c;
+ }
}
void StringImpl::init(const UChar* str, unsigned len)