[webkit-changes] cvs commit: LayoutTests/fast/encoding
charset-cp1251-expected.txt charset-cp1251.html
Darin
darin at opensource.apple.com
Sun Dec 18 14:37:27 PST 2005
darin 05/12/18 14:37:27
Modified: . ChangeLog
kwq KWQCharsets.mm
. ChangeLog
Added: fast/encoding charset-cp1251-expected.txt
charset-cp1251.html
Log:
LayoutTests:
Reviewed and landed by Darin.
- test of a particular character set name that is not in the WebCore table
but is in the ICU table (see bugzilla 5932)
* fast/encoding/charset-cp1251-expected.txt: Added.
* fast/encoding/charset-cp1251.html: Added.
WebCore:
Reviewed and landed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5932
Wrong encoding used for http://www.miel.ru
* kwq/KWQCharsets.mm: (KWQCFStringEncodingFromIANACharsetName):
Fall back on ICU encoding names if we don't find the name in the WebCore
encoding names table.
Revision Changes Path
1.561 +11 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.560
retrieving revision 1.561
diff -u -r1.560 -r1.561
--- ChangeLog 18 Dec 2005 22:23:23 -0000 1.560
+++ ChangeLog 18 Dec 2005 22:37:24 -0000 1.561
@@ -2,6 +2,17 @@
Reviewed and landed by Darin.
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5932
+ Wrong encoding used for http://www.miel.ru
+
+ * kwq/KWQCharsets.mm: (KWQCFStringEncodingFromIANACharsetName):
+ Fall back on ICU encoding names if we don't find the name in the WebCore
+ encoding names table.
+
+2005-12-18 Alexey Proskuryakov <ap at nypop.com>
+
+ Reviewed and landed by Darin.
+
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5927
Result of XSLT transformation has no charset defined
1.24 +12 -3 WebCore/kwq/KWQCharsets.mm
Index: KWQCharsets.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQCharsets.mm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- KWQCharsets.mm 3 Oct 2005 21:13:01 -0000 1.23
+++ KWQCharsets.mm 18 Dec 2005 22:37:26 -0000 1.24
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005 Alexey Proskuryakov <ap at nypop.com>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,6 +27,9 @@
#include "config.h"
#import "KWQCharsets.h"
+#import <unicode/ucnv.h>
+#import <unicode/utypes.h>
+
struct CharsetEntry {
const char *name;
CFStringEncoding encoding;
@@ -71,10 +75,15 @@
const void *value;
if (!CFDictionaryGetValueIfPresent(nameToTable, name, &value)) {
- if (flags) {
- *flags = NoEncodingFlags;
+ UErrorCode err = U_ZERO_ERROR;
+ name = ucnv_getStandardName(name, "IANA", &err);
+
+ if (!name || !CFDictionaryGetValueIfPresent(nameToTable, name, &value)) {
+ if (flags) {
+ *flags = NoEncodingFlags;
+ }
+ return kCFStringEncodingInvalidId;
}
- return kCFStringEncodingInvalidId;
}
if (flags) {
*flags = static_cast<const CharsetEntry *>(value)->flags;
1.167 +10 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- ChangeLog 18 Dec 2005 22:23:28 -0000 1.166
+++ ChangeLog 18 Dec 2005 22:37:26 -0000 1.167
@@ -2,6 +2,16 @@
Reviewed and landed by Darin.
+ - test of a particular character set name that is not in the WebCore table
+ but is in the ICU table (see bugzilla 5932)
+
+ * fast/encoding/charset-cp1251-expected.txt: Added.
+ * fast/encoding/charset-cp1251.html: Added.
+
+2005-12-18 Alexey Proskuryakov <ap at nypop.com>
+
+ Reviewed and landed by Darin.
+
- XSLT document encoding tests
* fast/xsl/xslt-doc-enc-expected.txt: Added.
1.1 LayoutTests/fast/encoding/charset-cp1251-expected.txt
Index: charset-cp1251-expected.txt
===================================================================
Ðак видно, пÑиÑм?
1.1 LayoutTests/fast/encoding/charset-cp1251.html
Index: charset-cp1251.html
===================================================================
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=cp1251">
<title>cp1251</title>
</head>
<body>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
Êàê âèäíî, ïðè¸ì?
</body>
</html>
More information about the webkit-changes
mailing list