[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a7d237cff54e28894f20a2c2bb47fa067ef1163b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Apr 24 18:13:02 2003 +0000
WebCore:
Reviewed by John.
- improved the text encoding database
* kwq/mac-encodings.txt: Changed to a new format. Now the first encoding name in every list
is the "canonical" one and is in canonical case and punctuation (no longer requiring lowercase).
Since the first is the one that will be used outgoing to send to servers, it's good to have
that one in canonical form. All subsequent aliases in the list are now required to be all
lowercase and not use any punctuation. Since the comparison is done ignoring non-alphanumeric
characters, and ignoring case, this will have no effect on which encodings are recognized.
* kwq/make-charset-table.pl: Updated to enforce the new format rules.
* kwq/KWQCharsetData.c: Regenerated.
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Simplify the "change commas
to spaces" code in a way that lets us get rid of APPLE_CHANGES. Use the official "ISO-8859-1"
here instead of something almost, but not quite, like it.
* kwq/KWQKCharsets.mm: (KCharsets::codecForName): Use the official "ISO-8859-1" here instead
of the unofficial "latin1". Unimportant, but cleaner this way.
- preparation for some text encoding changes to fix some bugs
* kwq/KWQKHTMLSettings.h: Added an encoding value rather than always returning a hardcoded
value. Other minor cleanup.
* kwq/KWQKHTMLSettings.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed KWQKHTMLSettings.mm.
- other changes
* kwq/KWQKHTMLPart.h: Removed "using" statement. Headers must not pollute the namespace
by doing "using".
* khtml/khtml_part.cpp: Added a "using" here.
* kwq/KWQPageState.mm: Added a "using" here.
* kwq/KWQString.h: Added an append that takes a const char * and length for use by the decoder.
* kwq/KWQString.mm: (QString::append): Implemented it.
* kwq/WebCoreSettings.h: Added default text encoding field and methods.
* kwq/WebCoreSettings.mm:
(-[WebCoreSettings dealloc]): Release defaultTextEncoding.
(-[WebCoreSettings setDefaultTextEncoding:]): Added.
(-[WebCoreSettings defaultTextEncoding]): Added.
WebKit:
Reviewed by John.
* WebView.subproj/WebViewPrivate.m: (-[WebView _updateWebCoreSettingsFromPreferences:]):
Added a call to the new setDefaultTextEncoding: method in WebCore. A preparation
step for some encoding bug fixes.
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView addSuperviewObservers]): Improved a comment.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index b694b1d..dc7163e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,49 @@
+2003-04-24 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - improved the text encoding database
+
+ * kwq/mac-encodings.txt: Changed to a new format. Now the first encoding name in every list
+ is the "canonical" one and is in canonical case and punctuation (no longer requiring lowercase).
+ Since the first is the one that will be used outgoing to send to servers, it's good to have
+ that one in canonical form. All subsequent aliases in the list are now required to be all
+ lowercase and not use any punctuation. Since the comparison is done ignoring non-alphanumeric
+ characters, and ignoring case, this will have no effect on which encodings are recognized.
+
+ * kwq/make-charset-table.pl: Updated to enforce the new format rules.
+
+ * kwq/KWQCharsetData.c: Regenerated.
+
+ * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Simplify the "change commas
+ to spaces" code in a way that lets us get rid of APPLE_CHANGES. Use the official "ISO-8859-1"
+ here instead of something almost, but not quite, like it.
+ * kwq/KWQKCharsets.mm: (KCharsets::codecForName): Use the official "ISO-8859-1" here instead
+ of the unofficial "latin1". Unimportant, but cleaner this way.
+
+ - preparation for some text encoding changes to fix some bugs
+
+ * kwq/KWQKHTMLSettings.h: Added an encoding value rather than always returning a hardcoded
+ value. Other minor cleanup.
+ * kwq/KWQKHTMLSettings.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Removed KWQKHTMLSettings.mm.
+
+ - other changes
+
+ * kwq/KWQKHTMLPart.h: Removed "using" statement. Headers must not pollute the namespace
+ by doing "using".
+ * khtml/khtml_part.cpp: Added a "using" here.
+ * kwq/KWQPageState.mm: Added a "using" here.
+
+ * kwq/KWQString.h: Added an append that takes a const char * and length for use by the decoder.
+ * kwq/KWQString.mm: (QString::append): Implemented it.
+
+ * kwq/WebCoreSettings.h: Added default text encoding field and methods.
+ * kwq/WebCoreSettings.mm:
+ (-[WebCoreSettings dealloc]): Release defaultTextEncoding.
+ (-[WebCoreSettings setDefaultTextEncoding:]): Added.
+ (-[WebCoreSettings defaultTextEncoding]): Added.
+
=== Safari-75 ===
=== Safari-74 ===
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b694b1d..dc7163e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,49 @@
+2003-04-24 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - improved the text encoding database
+
+ * kwq/mac-encodings.txt: Changed to a new format. Now the first encoding name in every list
+ is the "canonical" one and is in canonical case and punctuation (no longer requiring lowercase).
+ Since the first is the one that will be used outgoing to send to servers, it's good to have
+ that one in canonical form. All subsequent aliases in the list are now required to be all
+ lowercase and not use any punctuation. Since the comparison is done ignoring non-alphanumeric
+ characters, and ignoring case, this will have no effect on which encodings are recognized.
+
+ * kwq/make-charset-table.pl: Updated to enforce the new format rules.
+
+ * kwq/KWQCharsetData.c: Regenerated.
+
+ * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Simplify the "change commas
+ to spaces" code in a way that lets us get rid of APPLE_CHANGES. Use the official "ISO-8859-1"
+ here instead of something almost, but not quite, like it.
+ * kwq/KWQKCharsets.mm: (KCharsets::codecForName): Use the official "ISO-8859-1" here instead
+ of the unofficial "latin1". Unimportant, but cleaner this way.
+
+ - preparation for some text encoding changes to fix some bugs
+
+ * kwq/KWQKHTMLSettings.h: Added an encoding value rather than always returning a hardcoded
+ value. Other minor cleanup.
+ * kwq/KWQKHTMLSettings.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Removed KWQKHTMLSettings.mm.
+
+ - other changes
+
+ * kwq/KWQKHTMLPart.h: Removed "using" statement. Headers must not pollute the namespace
+ by doing "using".
+ * khtml/khtml_part.cpp: Added a "using" here.
+ * kwq/KWQPageState.mm: Added a "using" here.
+
+ * kwq/KWQString.h: Added an append that takes a const char * and length for use by the decoder.
+ * kwq/KWQString.mm: (QString::append): Implemented it.
+
+ * kwq/WebCoreSettings.h: Added default text encoding field and methods.
+ * kwq/WebCoreSettings.mm:
+ (-[WebCoreSettings dealloc]): Release defaultTextEncoding.
+ (-[WebCoreSettings setDefaultTextEncoding:]): Added.
+ (-[WebCoreSettings defaultTextEncoding]): Added.
+
=== Safari-75 ===
=== Safari-74 ===
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 53ffec6..7e8f3c8 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -548,7 +548,6 @@
F587858902DE375901EA4122,
F587858A02DE375901EA4122,
F587858B02DE375901EA4122,
- F587858D02DE375901EA4122,
F587858E02DE375901EA4122,
F587858F02DE375901EA4122,
F587859102DE375901EA4122,
@@ -5168,12 +5167,6 @@
path = KWQKHTMLPart.h;
refType = 4;
};
- F58784FB02DE375901EA4122 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = KWQKHTMLSettings.mm;
- refType = 4;
- };
F58784FC02DE375901EA4122 = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -5912,12 +5905,6 @@
settings = {
};
};
- F587858D02DE375901EA4122 = {
- fileRef = F58784FB02DE375901EA4122;
- isa = PBXBuildFile;
- settings = {
- };
- };
F587858E02DE375901EA4122 = {
fileRef = F58784FC02DE375901EA4122;
isa = PBXBuildFile;
@@ -6917,7 +6904,6 @@
F587863502DE3A1401EA4122,
F587863702DE3A1401EA4122,
F587863A02DE3A1401EA4122,
- F58784FB02DE375901EA4122,
);
isa = PBXGroup;
name = khtml;
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 7b4fa0f..9a75172 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -278,22 +278,8 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
QCString enc_string = ""; // used for non-multipart data
// find out the QTextcodec to use
-#if APPLE_CHANGES
- QString origStr = m_acceptcharset.string();
- QChar space(' ');
- QChar strChars[origStr.length()];
-
- for(unsigned int i=0; i < origStr.length(); i++)
- if(origStr[i].latin1() == ',')
- strChars[i] = space;
- else
- strChars[i] = origStr[i];
- QString str(strChars, origStr.length());
-#else /* APPLE_CHANGES not defined */
QString str = m_acceptcharset.string();
- QChar space(' ');
- for(unsigned int i=0; i < str.length(); i++) if(str[i].latin1() == ',') str[i] = space;
-#endif /* APPLE_CHANGES not defined */
+ str.replace(',', ' ');
QStringList charsets = QStringList::split(' ', str);
QTextCodec* codec = 0;
KHTMLView *view = getDocument()->view();
@@ -303,7 +289,7 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
if(enc.contains("UNKNOWN"))
{
// use standard document encoding
- enc = "ISO 8859-1";
+ enc = "ISO-8859-1";
if(view && view->part())
enc = view->part()->encoding();
}
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index e6fc427..5a7b298 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -96,6 +96,7 @@ using namespace DOM;
#include <CoreServices/CoreServices.h>
#endif
+using khtml::RenderObject;
using khtml::RenderText;
using khtml::TextRunArray;
diff --git a/WebCore/kwq/KWQCharsetData.c b/WebCore/kwq/KWQCharsetData.c
index 03b7d70..5f34994 100644
--- a/WebCore/kwq/KWQCharsetData.c
+++ b/WebCore/kwq/KWQCharsetData.c
@@ -1,50 +1,49 @@
static const CharsetEntry table[] = {
+ { "macintosh", kCFStringEncodingMacRoman, NoEncodingFlags },
{ "csmacintosh", kCFStringEncodingMacRoman, NoEncodingFlags },
{ "mac", kCFStringEncodingMacRoman, NoEncodingFlags },
- { "macintosh", kCFStringEncodingMacRoman, NoEncodingFlags },
- { "x-mac-roman", kCFStringEncodingMacRoman, NoEncodingFlags },
+ { "xmacroman", kCFStringEncodingMacRoman, NoEncodingFlags },
{ "windows-1252", kCFStringEncodingWindowsLatin1, NoEncodingFlags },
{ "winlatin1", kCFStringEncodingWindowsLatin1, NoEncodingFlags },
- { "x-ansi", kCFStringEncodingWindowsLatin1, NoEncodingFlags },
- { "8859_1", kCFStringEncodingISOLatin1, NoEncodingFlags },
+ { "xansi", kCFStringEncodingWindowsLatin1, NoEncodingFlags },
+ { "ISO-8859-1", kCFStringEncodingISOLatin1, NoEncodingFlags },
+ { "88591", kCFStringEncodingISOLatin1, NoEncodingFlags },
{ "cp819", kCFStringEncodingISOLatin1, NoEncodingFlags },
{ "csisolatin1", kCFStringEncodingISOLatin1, NoEncodingFlags },
{ "ibm819", kCFStringEncodingISOLatin1, NoEncodingFlags },
- { "iso-8859-1", kCFStringEncodingISOLatin1, NoEncodingFlags },
- { "iso-ir-100", kCFStringEncodingISOLatin1, NoEncodingFlags },
- { "iso8859-1", kCFStringEncodingISOLatin1, NoEncodingFlags },
- { "iso_8859-1", kCFStringEncodingISOLatin1, NoEncodingFlags },
- { "iso_8859-1:1987", kCFStringEncodingISOLatin1, NoEncodingFlags },
+ { "iso885911987", kCFStringEncodingISOLatin1, NoEncodingFlags },
+ { "isoir100", kCFStringEncodingISOLatin1, NoEncodingFlags },
{ "l1", kCFStringEncodingISOLatin1, NoEncodingFlags },
{ "latin1", kCFStringEncodingISOLatin1, NoEncodingFlags },
{ "x-nextstep", kCFStringEncodingNextStepLatin, NoEncodingFlags },
- { "ansi_x3.4-1968", kCFStringEncodingASCII, NoEncodingFlags },
- { "ansi_x3.4-1986", kCFStringEncodingASCII, NoEncodingFlags },
+ { "US-ASCII", kCFStringEncodingASCII, NoEncodingFlags },
+ { "ansix341968", kCFStringEncodingASCII, NoEncodingFlags },
+ { "ansix341986", kCFStringEncodingASCII, NoEncodingFlags },
{ "ascii", kCFStringEncodingASCII, NoEncodingFlags },
{ "cp367", kCFStringEncodingASCII, NoEncodingFlags },
{ "csascii", kCFStringEncodingASCII, NoEncodingFlags },
{ "ibm367", kCFStringEncodingASCII, NoEncodingFlags },
- { "iso-ir-6", kCFStringEncodingASCII, NoEncodingFlags },
- { "iso-ir-6us", kCFStringEncodingASCII, NoEncodingFlags },
- { "iso646-us", kCFStringEncodingASCII, NoEncodingFlags },
- { "iso_646.irv:1991", kCFStringEncodingASCII, NoEncodingFlags },
+ { "iso646irv1991", kCFStringEncodingASCII, NoEncodingFlags },
+ { "iso646us", kCFStringEncodingASCII, NoEncodingFlags },
+ { "isoir6", kCFStringEncodingASCII, NoEncodingFlags },
+ { "isoir6us", kCFStringEncodingASCII, NoEncodingFlags },
{ "us", kCFStringEncodingASCII, NoEncodingFlags },
- { "us-ascii", kCFStringEncodingASCII, NoEncodingFlags },
+ { "ISO-10646-UCS-2", kCFStringEncodingUnicode, NoEncodingFlags },
{ "csunicode", kCFStringEncodingUnicode, NoEncodingFlags },
- { "iso-10646-ucs-2", kCFStringEncodingUnicode, NoEncodingFlags },
+ { "ucs2", kCFStringEncodingUnicode, NoEncodingFlags },
{ "unicode", kCFStringEncodingUnicode, NoEncodingFlags },
- { "utf-16", kCFStringEncodingUnicode, NoEncodingFlags },
+ { "utf16", kCFStringEncodingUnicode, NoEncodingFlags },
+ { "UTF-16BE", kCFStringEncodingUnicode, BigEndian },
{ "unicodefeff", kCFStringEncodingUnicode, BigEndian },
- { "utf-16be", kCFStringEncodingUnicode, BigEndian },
+ { "UTF-16LE", kCFStringEncodingUnicode, LittleEndian },
{ "unicodefffe", kCFStringEncodingUnicode, LittleEndian },
- { "utf-16le", kCFStringEncodingUnicode, LittleEndian },
- { "unicode-1-1-utf-8", kCFStringEncodingUTF8, NoEncodingFlags },
- { "unicode-2-0-utf-8", kCFStringEncodingUTF8, NoEncodingFlags },
- { "utf-8", kCFStringEncodingUTF8, NoEncodingFlags },
- { "x-unicode-2-0-utf-8", kCFStringEncodingUTF8, NoEncodingFlags },
+ { "UTF-8", kCFStringEncodingUTF8, NoEncodingFlags },
+ { "unicode11utf8", kCFStringEncodingUTF8, NoEncodingFlags },
+ { "unicode20utf8", kCFStringEncodingUTF8, NoEncodingFlags },
+ { "xunicode20utf8", kCFStringEncodingUTF8, NoEncodingFlags },
{ "x-mac-japanese", kCFStringEncodingMacJapanese, IsJapanese },
{ "x-mac-chinesetrad", kCFStringEncodingMacChineseTrad, NoEncodingFlags },
- { "x-mac-trad-chinese", kCFStringEncodingMacChineseTrad, NoEncodingFlags },
+ { "xmactradchinese", kCFStringEncodingMacChineseTrad, NoEncodingFlags },
{ "x-mac-korean", kCFStringEncodingMacKorean, NoEncodingFlags },
{ "x-mac-arabic", kCFStringEncodingMacArabic, NoEncodingFlags },
{ "x-mac-hebrew", kCFStringEncodingMacHebrew, NoEncodingFlags },
@@ -55,10 +54,10 @@ static const CharsetEntry table[] = {
{ "x-mac-gujarati", kCFStringEncodingMacGujarati, NoEncodingFlags },
{ "x-mac-thai", kCFStringEncodingMacThai, NoEncodingFlags },
{ "x-mac-chinesesimp", kCFStringEncodingMacChineseSimp, NoEncodingFlags },
- { "x-mac-simp-chinese", kCFStringEncodingMacChineseSimp, NoEncodingFlags },
+ { "xmacsimpchinese", kCFStringEncodingMacChineseSimp, NoEncodingFlags },
{ "x-mac-tibetan", kCFStringEncodingMacTibetan, NoEncodingFlags },
- { "x-mac-ce", kCFStringEncodingMacCentralEurRoman, NoEncodingFlags },
{ "x-mac-centraleurroman", kCFStringEncodingMacCentralEurRoman, NoEncodingFlags },
+ { "xmacce", kCFStringEncodingMacCentralEurRoman, NoEncodingFlags },
{ "x-mac-symbol", kCFStringEncodingMacSymbol, NoEncodingFlags },
{ "x-mac-dingbats", kCFStringEncodingMacDingbats, NoEncodingFlags },
{ "x-mac-turkish", kCFStringEncodingMacTurkish, NoEncodingFlags },
@@ -68,96 +67,82 @@ static const CharsetEntry table[] = {
{ "x-mac-farsi", kCFStringEncodingMacFarsi, NoEncodingFlags },
{ "x-mac-ukrainian", kCFStringEncodingMacUkrainian, NoEncodingFlags },
{ "x-mac-vt100", kCFStringEncodingMacVT100, NoEncodingFlags },
+ { "ISO-8859-2", kCFStringEncodingISOLatin2, NoEncodingFlags },
{ "csisolatin2", kCFStringEncodingISOLatin2, NoEncodingFlags },
- { "iso-8859-2", kCFStringEncodingISOLatin2, NoEncodingFlags },
- { "iso-ir-101", kCFStringEncodingISOLatin2, NoEncodingFlags },
- { "iso8859-2", kCFStringEncodingISOLatin2, NoEncodingFlags },
- { "iso_8859-2", kCFStringEncodingISOLatin2, NoEncodingFlags },
- { "iso_8859-2:1987", kCFStringEncodingISOLatin2, NoEncodingFlags },
+ { "iso885921987", kCFStringEncodingISOLatin2, NoEncodingFlags },
+ { "isoir101", kCFStringEncodingISOLatin2, NoEncodingFlags },
{ "l2", kCFStringEncodingISOLatin2, NoEncodingFlags },
{ "latin2", kCFStringEncodingISOLatin2, NoEncodingFlags },
+ { "ISO-8859-3", kCFStringEncodingISOLatin3, NoEncodingFlags },
{ "csisolatin3", kCFStringEncodingISOLatin3, NoEncodingFlags },
- { "iso-8859-3", kCFStringEncodingISOLatin3, NoEncodingFlags },
- { "iso-ir-109", kCFStringEncodingISOLatin3, NoEncodingFlags },
- { "iso_8859-3", kCFStringEncodingISOLatin3, NoEncodingFlags },
- { "iso_8859-3:1988", kCFStringEncodingISOLatin3, NoEncodingFlags },
+ { "iso885931988", kCFStringEncodingISOLatin3, NoEncodingFlags },
+ { "isoir109", kCFStringEncodingISOLatin3, NoEncodingFlags },
{ "l3", kCFStringEncodingISOLatin3, NoEncodingFlags },
{ "latin3", kCFStringEncodingISOLatin3, NoEncodingFlags },
+ { "ISO-8859-4", kCFStringEncodingISOLatin4, NoEncodingFlags },
{ "csisolatin4", kCFStringEncodingISOLatin4, NoEncodingFlags },
- { "iso-8859-4", kCFStringEncodingISOLatin4, NoEncodingFlags },
- { "iso-ir-110", kCFStringEncodingISOLatin4, NoEncodingFlags },
- { "iso_8859-4", kCFStringEncodingISOLatin4, NoEncodingFlags },
- { "iso_8859-4:1988", kCFStringEncodingISOLatin4, NoEncodingFlags },
+ { "iso885941988", kCFStringEncodingISOLatin4, NoEncodingFlags },
+ { "isoir110", kCFStringEncodingISOLatin4, NoEncodingFlags },
{ "l4", kCFStringEncodingISOLatin4, NoEncodingFlags },
{ "latin4", kCFStringEncodingISOLatin4, NoEncodingFlags },
+ { "ISO-8859-5", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
{ "csisolatincyrillic", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
{ "cyrillic", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
- { "iso-8859-5", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
- { "iso-ir-144", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
- { "iso_8859-5", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
- { "iso_8859-5:1988", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
+ { "iso885951988", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
+ { "isoir144", kCFStringEncodingISOLatinCyrillic, NoEncodingFlags },
+ { "ISO-8859-6", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
{ "arabic", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
- { "asmo-708", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
+ { "asmo708", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
{ "csisolatinarabic", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
- { "ecma-114", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
- { "iso-8859-6", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
- { "iso-ir-127", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
- { "iso_8859-6", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
- { "iso_8859-6:1987", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
+ { "ecma114", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
+ { "iso885961987", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
+ { "isoir127", kCFStringEncodingISOLatinArabic, NoEncodingFlags },
+ { "ISO-8859-7", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
{ "csisolatingreek", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
- { "ecma-118", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
- { "elot_928", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
+ { "ecma118", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
+ { "elot928", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
{ "greek", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
{ "greek8", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
- { "iso-8859-7", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
- { "iso-ir-126", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
- { "iso_8859-7", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
- { "iso_8859-7:1987", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
+ { "iso885971987", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
+ { "isoir126", kCFStringEncodingISOLatinGreek, NoEncodingFlags },
+ { "ISO-8859-8-I", kCFStringEncodingISOLatinHebrew, NoEncodingFlags },
{ "csiso88598i", kCFStringEncodingISOLatinHebrew, NoEncodingFlags },
- { "iso-8859-8-i", kCFStringEncodingISOLatinHebrew, NoEncodingFlags },
- { "iso_8859-8-i", kCFStringEncodingISOLatinHebrew, NoEncodingFlags },
{ "logical", kCFStringEncodingISOLatinHebrew, NoEncodingFlags },
+ { "ISO-8859-8-E", kCFStringEncodingISOLatinHebrew, VisualOrdering },
{ "csiso88598e", kCFStringEncodingISOLatinHebrew, VisualOrdering },
{ "csisolatinhebrew", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "dos-862", kCFStringEncodingISOLatinHebrew, VisualOrdering },
+ { "dos862", kCFStringEncodingISOLatinHebrew, VisualOrdering },
{ "hebrew", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "iso-8859-8", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "iso-8859-8-e", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "iso-ir-138", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "iso_8859-8", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "iso_8859-8-e", kCFStringEncodingISOLatinHebrew, VisualOrdering },
- { "iso_8859-8:1988", kCFStringEncodingISOLatinHebrew, VisualOrdering },
+ { "iso88598", kCFStringEncodingISOLatinHebrew, VisualOrdering },
+ { "iso885981988", kCFStringEncodingISOLatinHebrew, VisualOrdering },
+ { "isoir138", kCFStringEncodingISOLatinHebrew, VisualOrdering },
{ "visual", kCFStringEncodingISOLatinHebrew, VisualOrdering },
+ { "ISO-8859-9", kCFStringEncodingISOLatin5, NoEncodingFlags },
{ "csisolatin5", kCFStringEncodingISOLatin5, NoEncodingFlags },
- { "iso-8859-9", kCFStringEncodingISOLatin5, NoEncodingFlags },
- { "iso-ir-148", kCFStringEncodingISOLatin5, NoEncodingFlags },
- { "iso_8859-9", kCFStringEncodingISOLatin5, NoEncodingFlags },
- { "iso_8859-9:1989", kCFStringEncodingISOLatin5, NoEncodingFlags },
+ { "iso885991989", kCFStringEncodingISOLatin5, NoEncodingFlags },
+ { "isoir148", kCFStringEncodingISOLatin5, NoEncodingFlags },
{ "l5", kCFStringEncodingISOLatin5, NoEncodingFlags },
{ "latin5", kCFStringEncodingISOLatin5, NoEncodingFlags },
+ { "ISO-8859-10", kCFStringEncodingISOLatin6, NoEncodingFlags },
{ "csisolatin6", kCFStringEncodingISOLatin6, NoEncodingFlags },
- { "iso-8859-10", kCFStringEncodingISOLatin6, NoEncodingFlags },
- { "iso-ir-157", kCFStringEncodingISOLatin6, NoEncodingFlags },
- { "iso_8859-10:1992", kCFStringEncodingISOLatin6, NoEncodingFlags },
+ { "iso8859101992", kCFStringEncodingISOLatin6, NoEncodingFlags },
+ { "isoir157", kCFStringEncodingISOLatin6, NoEncodingFlags },
{ "l6", kCFStringEncodingISOLatin6, NoEncodingFlags },
{ "latin6", kCFStringEncodingISOLatin6, NoEncodingFlags },
- { "iso-8859-11", kCFStringEncodingISOLatinThai, NoEncodingFlags },
- { "iso-8859-13", kCFStringEncodingISOLatin7, NoEncodingFlags },
- { "iso-8859-14", kCFStringEncodingISOLatin8, NoEncodingFlags },
- { "iso-celtic", kCFStringEncodingISOLatin8, NoEncodingFlags },
- { "iso-ir-199", kCFStringEncodingISOLatin8, NoEncodingFlags },
- { "iso_8859-14", kCFStringEncodingISOLatin8, NoEncodingFlags },
- { "iso_8859-14:1998", kCFStringEncodingISOLatin8, NoEncodingFlags },
+ { "ISO-8859-11", kCFStringEncodingISOLatinThai, NoEncodingFlags },
+ { "ISO-8859-13", kCFStringEncodingISOLatin7, NoEncodingFlags },
+ { "ISO-8859-14", kCFStringEncodingISOLatin8, NoEncodingFlags },
+ { "iso8859141998", kCFStringEncodingISOLatin8, NoEncodingFlags },
+ { "isoceltic", kCFStringEncodingISOLatin8, NoEncodingFlags },
+ { "isoir199", kCFStringEncodingISOLatin8, NoEncodingFlags },
{ "l8", kCFStringEncodingISOLatin8, NoEncodingFlags },
{ "latin8", kCFStringEncodingISOLatin8, NoEncodingFlags },
+ { "ISO-8859-15", kCFStringEncodingISOLatin9, NoEncodingFlags },
{ "csisolatin9", kCFStringEncodingISOLatin9, NoEncodingFlags },
- { "iso-8859-15", kCFStringEncodingISOLatin9, NoEncodingFlags },
- { "iso_8859-15", kCFStringEncodingISOLatin9, NoEncodingFlags },
{ "l9", kCFStringEncodingISOLatin9, NoEncodingFlags },
- { "latin-9", kCFStringEncodingISOLatin9, NoEncodingFlags },
{ "latin9", kCFStringEncodingISOLatin9, NoEncodingFlags },
- { "437", kCFStringEncodingDOSLatinUS, NoEncodingFlags },
{ "cp437", kCFStringEncodingDOSLatinUS, NoEncodingFlags },
+ { "437", kCFStringEncodingDOSLatinUS, NoEncodingFlags },
{ "cspc8codepage437", kCFStringEncodingDOSLatinUS, NoEncodingFlags },
{ "ibm437", kCFStringEncodingDOSLatinUS, NoEncodingFlags },
{ "cp737", kCFStringEncodingDOSGreek, NoEncodingFlags },
@@ -166,153 +151,148 @@ static const CharsetEntry table[] = {
{ "cp775", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
{ "csibm500", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
{ "cspc775baltic", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
- { "ebcdic-cp-be", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
- { "ebcdic-cp-ch", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
+ { "ebcdiccpbe", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
+ { "ebcdiccpch", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
{ "ibm500", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
{ "ibm775", kCFStringEncodingDOSBalticRim, NoEncodingFlags },
- { "850", kCFStringEncodingDOSLatin1, NoEncodingFlags },
{ "cp850", kCFStringEncodingDOSLatin1, NoEncodingFlags },
+ { "850", kCFStringEncodingDOSLatin1, NoEncodingFlags },
{ "cspc850multilingual", kCFStringEncodingDOSLatin1, NoEncodingFlags },
{ "ibm850", kCFStringEncodingDOSLatin1, NoEncodingFlags },
- { "852", kCFStringEncodingDOSLatin2, NoEncodingFlags },
{ "cp852", kCFStringEncodingDOSLatin2, NoEncodingFlags },
+ { "852", kCFStringEncodingDOSLatin2, NoEncodingFlags },
{ "cspcp852", kCFStringEncodingDOSLatin2, NoEncodingFlags },
{ "ibm852", kCFStringEncodingDOSLatin2, NoEncodingFlags },
- { "857", kCFStringEncodingDOSTurkish, NoEncodingFlags },
{ "cp857", kCFStringEncodingDOSTurkish, NoEncodingFlags },
+ { "857", kCFStringEncodingDOSTurkish, NoEncodingFlags },
{ "csibm857", kCFStringEncodingDOSTurkish, NoEncodingFlags },
{ "ibm857", kCFStringEncodingDOSTurkish, NoEncodingFlags },
- { "861", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
- { "cp-is", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
{ "cp861", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
+ { "861", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
+ { "cpis", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
{ "csibm861", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
{ "ibm861", kCFStringEncodingDOSIcelandic, NoEncodingFlags },
{ "cp864", kCFStringEncodingDOSArabic, NoEncodingFlags },
{ "csibm864", kCFStringEncodingDOSArabic, NoEncodingFlags },
- { "dos-720", kCFStringEncodingDOSArabic, NoEncodingFlags },
+ { "dos720", kCFStringEncodingDOSArabic, NoEncodingFlags },
{ "ibm864", kCFStringEncodingDOSArabic, NoEncodingFlags },
- { "866", kCFStringEncodingDOSRussian, NoEncodingFlags },
{ "cp866", kCFStringEncodingDOSRussian, NoEncodingFlags },
+ { "866", kCFStringEncodingDOSRussian, NoEncodingFlags },
{ "csibm866", kCFStringEncodingDOSRussian, NoEncodingFlags },
{ "ibm866", kCFStringEncodingDOSRussian, NoEncodingFlags },
- { "869", kCFStringEncodingDOSGreek2, NoEncodingFlags },
- { "cp-gr", kCFStringEncodingDOSGreek2, NoEncodingFlags },
{ "cp869", kCFStringEncodingDOSGreek2, NoEncodingFlags },
+ { "869", kCFStringEncodingDOSGreek2, NoEncodingFlags },
+ { "cpgr", kCFStringEncodingDOSGreek2, NoEncodingFlags },
{ "csibm869", kCFStringEncodingDOSGreek2, NoEncodingFlags },
{ "ibm869", kCFStringEncodingDOSGreek2, NoEncodingFlags },
{ "cp874", kCFStringEncodingDOSThai, NoEncodingFlags },
- { "dos-874", kCFStringEncodingDOSThai, NoEncodingFlags },
- { "tis-620", kCFStringEncodingDOSThai, NoEncodingFlags },
- { "windows-874", kCFStringEncodingDOSThai, NoEncodingFlags },
+ { "dos874", kCFStringEncodingDOSThai, NoEncodingFlags },
+ { "tis620", kCFStringEncodingDOSThai, NoEncodingFlags },
+ { "windows874", kCFStringEncodingDOSThai, NoEncodingFlags },
{ "cp932", kCFStringEncodingDOSJapanese, IsJapanese },
{ "cswindows31j", kCFStringEncodingDOSJapanese, IsJapanese },
- { "windows-31j", kCFStringEncodingDOSJapanese, IsJapanese },
- { "x-ms-cp932", kCFStringEncodingDOSJapanese, IsJapanese },
+ { "windows31j", kCFStringEncodingDOSJapanese, IsJapanese },
+ { "xmscp932", kCFStringEncodingDOSJapanese, IsJapanese },
{ "cp950", kCFStringEncodingDOSChineseTrad, NoEncodingFlags },
{ "windows-1250", kCFStringEncodingWindowsLatin2, NoEncodingFlags },
{ "winlatin2", kCFStringEncodingWindowsLatin2, NoEncodingFlags },
- { "x-cp1250", kCFStringEncodingWindowsLatin2, NoEncodingFlags },
- { "wincyrillic", kCFStringEncodingWindowsCyrillic, NoEncodingFlags },
+ { "xcp1250", kCFStringEncodingWindowsLatin2, NoEncodingFlags },
{ "windows-1251", kCFStringEncodingWindowsCyrillic, NoEncodingFlags },
- { "x-cp1251", kCFStringEncodingWindowsCyrillic, NoEncodingFlags },
+ { "wincyrillic", kCFStringEncodingWindowsCyrillic, NoEncodingFlags },
+ { "xcp1251", kCFStringEncodingWindowsCyrillic, NoEncodingFlags },
{ "windows-1253", kCFStringEncodingWindowsGreek, NoEncodingFlags },
{ "wingreek", kCFStringEncodingWindowsGreek, NoEncodingFlags },
{ "windows-1254", kCFStringEncodingWindowsLatin5, NoEncodingFlags },
{ "winturkish", kCFStringEncodingWindowsLatin5, NoEncodingFlags },
{ "windows-1255", kCFStringEncodingWindowsHebrew, NoEncodingFlags },
{ "winhebrew", kCFStringEncodingWindowsHebrew, NoEncodingFlags },
+ { "windows-1256", kCFStringEncodingWindowsArabic, NoEncodingFlags },
{ "cp1256", kCFStringEncodingWindowsArabic, NoEncodingFlags },
{ "winarabic", kCFStringEncodingWindowsArabic, NoEncodingFlags },
- { "windows-1256", kCFStringEncodingWindowsArabic, NoEncodingFlags },
- { "winbaltic", kCFStringEncodingWindowsBalticRim, NoEncodingFlags },
{ "windows-1257", kCFStringEncodingWindowsBalticRim, NoEncodingFlags },
+ { "winbaltic", kCFStringEncodingWindowsBalticRim, NoEncodingFlags },
{ "johab", kCFStringEncodingWindowsKoreanJohab, NoEncodingFlags },
{ "windows-1258", kCFStringEncodingWindowsVietnamese, NoEncodingFlags },
{ "winvietnamese", kCFStringEncodingWindowsVietnamese, NoEncodingFlags },
+ { "JIS_X0201", kCFStringEncodingJIS_X0201_76, IsJapanese },
{ "cshalfwidthkatakana", kCFStringEncodingJIS_X0201_76, IsJapanese },
- { "jis_x0201", kCFStringEncodingJIS_X0201_76, IsJapanese },
{ "x0201", kCFStringEncodingJIS_X0201_76, IsJapanese },
+ { "JIS_X0208-1983", kCFStringEncodingJIS_X0208_83, IsJapanese },
{ "csiso87jisx0208", kCFStringEncodingJIS_X0208_83, IsJapanese },
- { "iso-ir-87", kCFStringEncodingJIS_X0208_83, IsJapanese },
- { "jis_c6226-1983", kCFStringEncodingJIS_X0208_83, IsJapanese },
- { "jis_x0208-1983", kCFStringEncodingJIS_X0208_83, IsJapanese },
+ { "isoir87", kCFStringEncodingJIS_X0208_83, IsJapanese },
+ { "jisc62261983", kCFStringEncodingJIS_X0208_83, IsJapanese },
{ "x0208", kCFStringEncodingJIS_X0208_83, IsJapanese },
- { "jis_x0208-1990", kCFStringEncodingJIS_X0208_90, IsJapanese },
+ { "JIS_X0208-1990", kCFStringEncodingJIS_X0208_90, IsJapanese },
+ { "JIS_X0212-1990", kCFStringEncodingJIS_X0212_90, IsJapanese },
{ "csiso159jisx02121990", kCFStringEncodingJIS_X0212_90, IsJapanese },
- { "iso-ir-159", kCFStringEncodingJIS_X0212_90, IsJapanese },
- { "jis_x0212-1990", kCFStringEncodingJIS_X0212_90, IsJapanese },
+ { "isoir159", kCFStringEncodingJIS_X0212_90, IsJapanese },
{ "x0212", kCFStringEncodingJIS_X0212_90, IsJapanese },
+ { "JIS_C6226-1978", kCFStringEncodingJIS_C6226_78, IsJapanese },
{ "csiso42jisc62261978", kCFStringEncodingJIS_C6226_78, IsJapanese },
- { "iso-ir-42", kCFStringEncodingJIS_C6226_78, IsJapanese },
- { "jis_c6226-1978", kCFStringEncodingJIS_C6226_78, IsJapanese },
+ { "isoir42", kCFStringEncodingJIS_C6226_78, IsJapanese },
+ { "Shift_JIS", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
{ "csshiftjis", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
- { "ms_kanji", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
- { "shift-jis", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
- { "shift_jis", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
- { "x-sjis", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
+ { "mskanji", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
+ { "xsjis", kCFStringEncodingShiftJIS_X0213_00, IsJapanese },
+ { "GB18030", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "chinese", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "cn-gb", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "cngb", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "cp936", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "csgb2312", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "csgb231280", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "csiso58gb231280", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "euc-cn", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "gb18030", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "euccn", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "gb2312", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "gb_2312-80", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "gb231280", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "gbk", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "iso-ir-58", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "isoir58", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
{ "ms936", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "windows-936", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "x-euc-cn", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
- { "x-gbk", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "windows936", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "xeuccn", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "xgbk", kCFStringEncodingGB_18030_2000, NoEncodingFlags },
+ { "ISO-2022-JP", kCFStringEncodingISO_2022_JP, IsJapanese },
{ "csiso2022jp", kCFStringEncodingISO_2022_JP, IsJapanese },
- { "iso-2022-jp", kCFStringEncodingISO_2022_JP, IsJapanese },
{ "jis7", kCFStringEncodingISO_2022_JP, IsJapanese },
+ { "ISO-2022-JP-2", kCFStringEncodingISO_2022_JP_2, IsJapanese },
{ "csiso2022jp2", kCFStringEncodingISO_2022_JP_2, IsJapanese },
- { "iso-2022-jp-2", kCFStringEncodingISO_2022_JP_2, IsJapanese },
- { "iso-2022-jp-1", kCFStringEncodingISO_2022_JP_1, IsJapanese },
- { "iso-2022-jp-3", kCFStringEncodingISO_2022_JP_3, IsJapanese },
- { "iso-2022-cn", kCFStringEncodingISO_2022_CN, NoEncodingFlags },
- { "iso-2022-cn-ext", kCFStringEncodingISO_2022_CN_EXT, NoEncodingFlags },
+ { "ISO-2022-JP-1", kCFStringEncodingISO_2022_JP_1, IsJapanese },
+ { "ISO-2022-JP-3", kCFStringEncodingISO_2022_JP_3, IsJapanese },
+ { "ISO-2022-CN", kCFStringEncodingISO_2022_CN, NoEncodingFlags },
+ { "ISO-2022-CN-EXT", kCFStringEncodingISO_2022_CN_EXT, NoEncodingFlags },
+ { "ISO-2022-KR", kCFStringEncodingISO_2022_KR, NoEncodingFlags },
{ "csiso2022kr", kCFStringEncodingISO_2022_KR, NoEncodingFlags },
- { "iso-2022-kr", kCFStringEncodingISO_2022_KR, NoEncodingFlags },
+ { "EUC-JP", kCFStringEncodingEUC_JP, IsJapanese },
{ "cseucpkdfmtjapanese", kCFStringEncodingEUC_JP, IsJapanese },
- { "euc-jp", kCFStringEncodingEUC_JP, IsJapanese },
- { "extended_unix_code_packed_format_for_japanese", kCFStringEncodingEUC_JP, IsJapanese },
- { "x-euc", kCFStringEncodingEUC_JP, IsJapanese },
- { "x-euc-jp", kCFStringEncodingEUC_JP, IsJapanese },
- { "euc-tw", kCFStringEncodingEUC_TW, NoEncodingFlags },
+ { "extendedunixcodepackedformatforjapanese", kCFStringEncodingEUC_JP, IsJapanese },
+ { "xeuc", kCFStringEncodingEUC_JP, IsJapanese },
+ { "xeucjp", kCFStringEncodingEUC_JP, IsJapanese },
+ { "EUC-TW", kCFStringEncodingEUC_TW, NoEncodingFlags },
+ { "EUC-KR", kCFStringEncodingEUC_KR, NoEncodingFlags },
{ "cp949", kCFStringEncodingEUC_KR, NoEncodingFlags },
{ "cseuckr", kCFStringEncodingEUC_KR, NoEncodingFlags },
{ "csksc56011987", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "euc-kr", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "iso-ir-149", kCFStringEncodingEUC_KR, NoEncodingFlags },
+ { "isoir149", kCFStringEncodingEUC_KR, NoEncodingFlags },
{ "korean", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "ks_c_5601", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "ks_c_5601-1987", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "ks_c_5601-1989", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "ks_c_5601_1987", kCFStringEncodingEUC_KR, NoEncodingFlags },
{ "ksc5601", kCFStringEncodingEUC_KR, NoEncodingFlags },
- { "ksc_5601", kCFStringEncodingEUC_KR, NoEncodingFlags },
+ { "ksc56011987", kCFStringEncodingEUC_KR, NoEncodingFlags },
+ { "ksc56011989", kCFStringEncodingEUC_KR, NoEncodingFlags },
+ { "KOI8-R", kCFStringEncodingKOI8_R, NoEncodingFlags },
{ "cskoi8r", kCFStringEncodingKOI8_R, NoEncodingFlags },
{ "koi", kCFStringEncodingKOI8_R, NoEncodingFlags },
{ "koi8", kCFStringEncodingKOI8_R, NoEncodingFlags },
- { "koi8-r", kCFStringEncodingKOI8_R, NoEncodingFlags },
- { "koi8r", kCFStringEncodingKOI8_R, NoEncodingFlags },
{ "x-mac-roman-latin1", kCFStringEncodingMacRomanLatin1, NoEncodingFlags },
- { "hz-gb-2312", kCFStringEncodingHZ_GB_2312, NoEncodingFlags },
- { "big5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
- { "big5-hkscs", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
- { "cn-big5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
+ { "HZ-GB-2312", kCFStringEncodingHZ_GB_2312, NoEncodingFlags },
+ { "Big5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
+ { "big5hkscs", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
+ { "cnbig5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
{ "csbig5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
- { "x-x-big5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
+ { "xxbig5", kCFStringEncodingBig5_HKSCS_1999, NoEncodingFlags },
{ "cp037", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
{ "csibm037", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
- { "ebcdic-cp-ca", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
- { "ebcdic-cp-nl", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
- { "ebcdic-cp-us", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
- { "ebcdic-cp-wt", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
+ { "ebcdiccpca", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
+ { "ebcdiccpnl", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
+ { "ebcdiccpus", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
+ { "ebcdiccpwt", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
{ "ibm037", kCFStringEncodingEBCDIC_CP037, NoEncodingFlags },
{ 0, kCFStringEncodingInvalidId, NoEncodingFlags }
};
diff --git a/WebCore/kwq/KWQKCharsets.mm b/WebCore/kwq/KWQKCharsets.mm
index c1416ab..593f8e4 100644
--- a/WebCore/kwq/KWQKCharsets.mm
+++ b/WebCore/kwq/KWQKCharsets.mm
@@ -37,7 +37,7 @@ QTextCodec *KCharsets::codecForName(const char *s, bool &ok) const
QTextCodec *codec = QTextCodec::codecForName(s);
if (codec == NULL) {
ok = false;
- codec = QTextCodec::codecForName("latin1");
+ codec = QTextCodec::codecForName("ISO-8859-1");
} else {
ok = true;
}
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 6798331..7840d6a 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -75,8 +75,6 @@ enum KWQSelectionDirection {
KWQSelectingPrevious
};
-using khtml::RenderObject;
-
class KWQKHTMLPart : public KHTMLPart
{
public:
diff --git a/WebCore/kwq/KWQKHTMLSettings.h b/WebCore/kwq/KWQKHTMLSettings.h
index 176e3eb..2ac34de 100644
--- a/WebCore/kwq/KWQKHTMLSettings.h
+++ b/WebCore/kwq/KWQKHTMLSettings.h
@@ -40,9 +40,8 @@ public:
KAnimationEnabled
};
- KHTMLSettings() {};
+ KHTMLSettings() { }
- // Font settings
const QString &stdFontName() const { return _stdFontName; }
const QString &fixedFontName() const { return _fixedFontName; }
const QString &serifFontName() const { return _serifFontName; }
@@ -52,8 +51,6 @@ public:
static const QString &settingsToCSS() { return QString::null; }
- static const QString &encoding();
-
int minFontSize() const { return _minimumFontSize; }
int mediumFontSize() const { return _defaultFontSize; }
int mediumFixedFontSize() const { return _defaultFixedFontSize; }
@@ -69,13 +66,15 @@ public:
bool isJavaScriptEnabled() const { return _JavaScriptEnabled; }
bool JavaScriptCanOpenWindowsAutomatically() const { return _JavaScriptCanOpenWindowsAutomatically; }
bool isJavaScriptEnabled(const QString &host) const { return _JavaScriptEnabled; }
- bool isJavaScriptDebugEnabled() const { return false; }
+ static bool isJavaScriptDebugEnabled() { return false; }
bool isJavaEnabled() const { return _JavaEnabled; }
bool isJavaEnabled(const QString &host) const { return _JavaEnabled; }
bool isPluginsEnabled() const { return _pluginsEnabled; }
bool isPluginsEnabled(const QString &host) const { return _pluginsEnabled; }
- const QString &userStyleSheet() { return _userStyleSheetLocation; }
+ const QString &encoding() const { return _encoding; }
+
+ const QString &userStyleSheet() const { return _userStyleSheetLocation; }
void setStdFontName(const QString &s) { _stdFontName = s; }
void setFixedFontName(const QString &s) { _fixedFontName = s; }
@@ -94,8 +93,10 @@ public:
void setArePluginsEnabled(bool f) { _pluginsEnabled = f; }
void setJavaScriptCanOpenWindowsAutomatically(bool f) { _JavaScriptCanOpenWindowsAutomatically = f; }
- void setUserStyleSheet(const QString &s) { _userStyleSheetLocation = s; }
+ void setEncoding(const QString &s) { _encoding = s; }
+ void setUserStyleSheet(const QString &s) { _userStyleSheetLocation = s; }
+
private:
QString _stdFontName;
QString _fixedFontName;
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
deleted file mode 100644
index c609c9e..0000000
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "KWQKHTMLSettings.h"
-
-const QString &KHTMLSettings::encoding()
-{
- static QString latin1("latin1");
- return latin1;
-}
diff --git a/WebCore/kwq/KWQPageState.mm b/WebCore/kwq/KWQPageState.mm
index 79c4bd8..09d46cb 100644
--- a/WebCore/kwq/KWQPageState.mm
+++ b/WebCore/kwq/KWQPageState.mm
@@ -36,6 +36,8 @@
using DOM::DocumentImpl;
+using khtml::RenderObject;
+
using KJS::SavedProperties;
@implementation KWQPageState
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index c5dc133..eaed4f5 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -478,6 +478,7 @@ public:
void setBufferFromCFString(CFStringRef);
+ QString &append(const char *, uint length);
QString &append(const QChar *, uint length);
QString &prepend(const QChar *, uint length);
QString &insert(uint position, const QChar *, uint length);
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 9f58338..151c753 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -2014,6 +2014,11 @@ QString &QString::append(const QString &qs)
return insert(dataHandle[0]->_length, qs);
}
+QString &QString::append(const char *characters, uint length)
+{
+ return insert(dataHandle[0]->_length, characters, length);
+}
+
QString &QString::append(const QChar *characters, uint length)
{
return insert(dataHandle[0]->_length, characters, length);
diff --git a/WebCore/kwq/WebCoreSettings.h b/WebCore/kwq/WebCoreSettings.h
index 02b7110..c9d9236 100644
--- a/WebCore/kwq/WebCoreSettings.h
+++ b/WebCore/kwq/WebCoreSettings.h
@@ -48,6 +48,7 @@ class KHTMLSettings;
BOOL JavaScriptCanOpenWindowsAutomatically;
BOOL willLoadImagesAutomatically;
NSString *userStyleSheetLocation;
+ NSString *defaultTextEncoding;
KHTMLSettings *settings;
}
@@ -97,6 +98,9 @@ class KHTMLSettings;
- (void)setUserStyleSheetLocation:(NSString *)location;
- (NSString *)userStyleSheetLocation;
+- (void)setDefaultTextEncoding:(NSString *)encoding;
+- (NSString *)defaultTextEncoding;
+
- (KHTMLSettings *)settings;
@end
diff --git a/WebCore/kwq/WebCoreSettings.mm b/WebCore/kwq/WebCoreSettings.mm
index aecdf19..b9416b8 100644
--- a/WebCore/kwq/WebCoreSettings.mm
+++ b/WebCore/kwq/WebCoreSettings.mm
@@ -39,6 +39,7 @@
[sansSerifFontFamily release];
[cursiveFontFamily release];
[fantasyFontFamily release];
+ [defaultTextEncoding release];
delete settings;
@@ -270,6 +271,21 @@
return userStyleSheetLocation;
}
+- (void)setDefaultTextEncoding:(NSString *)s
+{
+ if ([defaultTextEncoding isEqualToString:s]) {
+ return;
+ }
+ [defaultTextEncoding release];
+ defaultTextEncoding = [s copy];
+ settings->setEncoding(QString::fromNSString(s));
+}
+
+- (NSString *)defaultTextEncoding
+{
+ return defaultTextEncoding;
+}
+
- (KHTMLSettings *)settings
{
return settings;
diff --git a/WebCore/kwq/mac-encodings.txt b/WebCore/kwq/mac-encodings.txt
index 86f926f..93a4a01 100644
--- a/WebCore/kwq/mac-encodings.txt
+++ b/WebCore/kwq/mac-encodings.txt
@@ -3,19 +3,19 @@
# repeated here; mentioning any one character set from a group in there pulls in all the aliases in
# that group.
-MacRoman: macintosh, x-mac-roman
-WindowsLatin1: windows-1252, winlatin1, x-ansi
-ISOLatin1: 8859_1, iso-8859-1, iso8859-1
+MacRoman: macintosh, xmacroman
+WindowsLatin1: windows-1252, winlatin1, xansi
+ISOLatin1: ISO-8859-1, 88591
NextStepLatin: x-nextstep
-ASCII: iso-ir-6us, us-ascii
-Unicode: iso-10646-ucs-2, unicode, utf-16
-Unicode, BigEndian: unicodefeff, utf-16be
-Unicode, LittleEndian: unicodefffe, utf-16le
-UTF8: unicode-1-1-utf-8, unicode-2-0-utf-8, utf-8, x-unicode-2-0-utf-8
+ASCII: US-ASCII, isoir6us
+Unicode: ISO-10646-UCS-2, ucs2, unicode, utf16
+Unicode, BigEndian: UTF-16BE, unicodefeff
+Unicode, LittleEndian: UTF-16LE, unicodefffe
+UTF8: UTF-8, unicode11utf8, unicode20utf8, xunicode20utf8
NonLossyASCII
MacJapanese, IsJapanese: x-mac-japanese
-MacChineseTrad: x-mac-chinesetrad, x-mac-trad-chinese
+MacChineseTrad: x-mac-chinesetrad, xmactradchinese
MacKorean: x-mac-korean
MacArabic: x-mac-arabic
MacHebrew: x-mac-hebrew
@@ -37,11 +37,11 @@ MacThai: x-mac-thai
MacLaotian
MacGeorgian
MacArmenian
-MacChineseSimp: x-mac-chinesesimp, x-mac-simp-chinese
+MacChineseSimp: x-mac-chinesesimp, xmacsimpchinese
MacTibetan: x-mac-tibetan
MacMongolian
MacEthiopic
-MacCentralEurRoman: x-mac-ce, x-mac-centraleurroman
+MacCentralEurRoman: x-mac-centraleurroman, xmacce
MacVietnamese
MacExtArabic
@@ -61,20 +61,20 @@ MacUkrainian: x-mac-ukrainian
MacInuit
MacVT100: x-mac-vt100
-ISOLatin2: iso-8859-2, iso8859-2
-ISOLatin3: iso-8859-3
-ISOLatin4: iso-8859-4
-ISOLatinCyrillic: iso-8859-5
-ISOLatinArabic: iso-8859-6
-ISOLatinGreek: iso-8859-7
-ISOLatinHebrew: iso-8859-8-i, logical
-ISOLatinHebrew, VisualOrdering: dos-862, iso-8859-8, iso-8859-8-e, visual
-ISOLatin5: iso-8859-9
-ISOLatin6: iso-8859-10
-ISOLatinThai: iso-8859-11
-ISOLatin7: iso-8859-13
-ISOLatin8: iso-8859-14
-ISOLatin9: csisolatin9, iso-8859-15, l9, latin9
+ISOLatin2: ISO-8859-2
+ISOLatin3: ISO-8859-3
+ISOLatin4: ISO-8859-4
+ISOLatinCyrillic: ISO-8859-5
+ISOLatinArabic: ISO-8859-6
+ISOLatinGreek: ISO-8859-7
+ISOLatinHebrew: ISO-8859-8-I, logical
+ISOLatinHebrew, VisualOrdering: ISO-8859-8-E, dos862, iso88598, visual
+ISOLatin5: ISO-8859-9
+ISOLatin6: ISO-8859-10
+ISOLatinThai: ISO-8859-11
+ISOLatin7: ISO-8859-13
+ISOLatin8: ISO-8859-14
+ISOLatin9: ISO-8859-15, csisolatin9, l9
DOSLatinUS: cp437
DOSGreek: cp737, ibm737
@@ -88,67 +88,63 @@ DOSPortuguese
DOSIcelandic: cp861
DOSHebrew
DOSCanadianFrench
-DOSArabic: cp864, dos-720
+DOSArabic: cp864, dos720
DOSNordic
DOSRussian: cp866
-DOSGreek2: ibm869
-DOSThai: cp874, dos-874, tis-620, windows-874
-DOSJapanese, IsJapanese: cp932, cswindows31j, x-ms-cp932
+DOSGreek2: cp869
+DOSThai: cp874, dos874, tis620, windows874
+DOSJapanese, IsJapanese: cp932, cswindows31j, xmscp932
DOSChineseSimplif
DOSKorean
DOSChineseTrad: cp950
-WindowsLatin2: windows-1250, winlatin2, x-cp1250
-WindowsCyrillic: wincyrillic, windows-1251, x-cp1251
+WindowsLatin2: windows-1250, winlatin2, xcp1250
+WindowsCyrillic: windows-1251, wincyrillic, xcp1251
WindowsGreek: windows-1253, wingreek
WindowsLatin5: windows-1254, winturkish
WindowsHebrew: windows-1255, winhebrew
-WindowsArabic: cp1256, winarabic, windows-1256
-WindowsBalticRim: winbaltic, windows-1257
+WindowsArabic: windows-1256, cp1256, winarabic
+WindowsBalticRim: windows-1257, winbaltic
WindowsKoreanJohab: johab
WindowsVietnamese: windows-1258, winvietnamese
-JIS_X0201_76, IsJapanese: jis_x0201
-JIS_X0208_83, IsJapanese: jis_x0208-1983
-JIS_X0208_90, IsJapanese: jis_x0208-1990
-JIS_X0212_90, IsJapanese: jis_x0212-1990
-JIS_C6226_78, IsJapanese: jis_c6226-1978
-ShiftJIS_X0213_00, IsJapanese: shift-jis, shift_jis, x-sjis
+JIS_X0201_76, IsJapanese: JIS_X0201
+JIS_X0208_83, IsJapanese: JIS_X0208-1983
+JIS_X0208_90, IsJapanese: JIS_X0208-1990
+JIS_X0212_90, IsJapanese: JIS_X0212-1990
+JIS_C6226_78, IsJapanese: JIS_C6226-1978
+ShiftJIS_X0213_00, IsJapanese: Shift_JIS, xsjis
GB_2312_80
GBK_95
-GB_18030_2000: cn-gb, csgb231280, euc-cn, gb18030, gb2312, gb_2312-80, gbk, x-euc-cn, x-gbk
+GB_18030_2000: GB18030, cngb, csgb231280, euccn, gb2312, gb231280, gbk, xeuccn, xgbk
KSC_5601_87
KSC_5601_92_Johab
CNS_11643_92_P1
CNS_11643_92_P2
CNS_11643_92_P3
-ISO_2022_JP, IsJapanese: iso-2022-jp, jis7
-ISO_2022_JP_2, IsJapanese: iso-2022-jp-2
-ISO_2022_JP_1, IsJapanese: iso-2022-jp-1
-ISO_2022_JP_3, IsJapanese: iso-2022-jp-3
-ISO_2022_CN: iso-2022-cn
-ISO_2022_CN_EXT: iso-2022-cn-ext
-ISO_2022_KR: iso-2022-kr
+ISO_2022_JP, IsJapanese: ISO-2022-JP, jis7
+ISO_2022_JP_2, IsJapanese: ISO-2022-JP-2
+ISO_2022_JP_1, IsJapanese: ISO-2022-JP-1
+ISO_2022_JP_3, IsJapanese: ISO-2022-JP-3
+ISO_2022_CN: ISO-2022-CN
+ISO_2022_CN_EXT: ISO-2022-CN-EXT
+ISO_2022_KR: ISO-2022-KR
-EUC_JP, IsJapanese: euc-jp, x-euc, x-euc-jp
+EUC_JP, IsJapanese: EUC-JP, xeuc, xeucjp
EUC_CN
-EUC_TW: euc-tw
-EUC_KR: cp949, euc-kr, ks_c_5601, ks_c_5601-1987, ks_c_5601_1987, ksc5601
+EUC_TW: EUC-TW
+EUC_KR: EUC-KR, cp949, ksc5601
ShiftJIS, IsJapanese
-KOI8_R: koi, koi8, koi8-r, koi8r
+KOI8_R: KOI8-R, koi, koi8
Big5
MacRomanLatin1: x-mac-roman-latin1
-HZ_GB_2312: hz-gb-2312
-Big5_HKSCS_1999: big5, big5-hkscs, cn-big5, x-x-big5
+HZ_GB_2312: HZ-GB-2312
+Big5_HKSCS_1999: Big5, big5hkscs, cnbig5, xxbig5
EBCDIC_US
EBCDIC_CP037: cp037
-# We need to decide what to do about this.
-# I'm not sure that the string japanese-autodetect actually shows up out there on the web.
-# 0xAFE: japanese-autodetect
-
# I got these additional items from the Perl module I18N-Charset-1.17,
# but could not figure out what to do with them.
#
@@ -161,5 +157,4 @@ EBCDIC_CP037: cp037
# EBCDIC-US === ebcdic-cp-us
# EBCDIC-FI-SE === ebcdic-cp-fi
# UTF-7 === Unicode-2-0-utf-7
-# ISO-10646-UCS-2 === ucs2
# ISO-10646-UCS-4 === ucs4
diff --git a/WebCore/kwq/make-charset-table.pl b/WebCore/kwq/make-charset-table.pl
index 84163d7..ca4b0c6 100755
--- a/WebCore/kwq/make-charset-table.pl
+++ b/WebCore/kwq/make-charset-table.pl
@@ -56,44 +56,54 @@ sub process_mac_encodings
# Build the aliases list.
# Also check that no two names are part of the same entry in the charsets file.
my @IANANames = split ", ", $IANANames;
+ my $firstName = "";
+ my $canonicalFirstName = "";
my $prevName = "";
for my $name (@IANANames) {
- if ($name !~ /^[-a-z0-9_]+$/) {
+ if ($firstName eq "") {
if ($name !~ /^[-A-Za-z0-9_]+$/) {
error "$name, in mac-encodings.txt, has illegal characters in it";
- } else {
- error "$name, in mac-encodings.txt, has capital letters in it";
+ next;
+ }
+ $firstName = $name;
+ } else {
+ if ($name !~ /^[a-z0-9]+$/) {
+ error "$name, in mac-encodings.txt, has illegal characters in it (must be all lowercase alphanumeric)";
+ next;
+ }
+ if ($name le $prevName) {
+ error "$name comes after $prevName in mac-encodings.txt, but everything must be in alphabetical order";
}
$prevName = $name;
- next;
}
- if ($name le $prevName) {
- error "$name comes after $prevName in mac-encodings.txt, but everything must be in alphabetical order";
- }
- $prevName = $name;
+ my $canonicalName = lc $name;
+ $canonicalName =~ tr/-_//d;
- error "$name is mentioned twice in mac-encodings.txt" if $seenIANANames{$name};
- $seenIANANames{$name} = 1;
+ $canonicalFirstName = $canonicalName if $canonicalFirstName eq "";
- $aliases{$name} = 1;
- next if !$aliasesFromCharsetsFile{$name};
- for my $alias (@{$aliasesFromCharsetsFile{$name}}) {
+ error "$name is mentioned twice in mac-encodings.txt" if $seenIANANames{$canonicalName};
+ $seenIANANames{$canonicalName} = 1;
+
+ $aliases{$canonicalName} = 1;
+ next if !$aliasesFromCharsetsFile{$canonicalName};
+ for my $alias (@{$aliasesFromCharsetsFile{$canonicalName}}) {
$aliases{$alias} = 1;
}
for my $otherName (@IANANames) {
- next if $name eq $otherName;
+ next if $canonicalName eq $otherName;
if ($aliasesFromCharsetsFile{$otherName}
- && $aliasesFromCharsetsFile{$name} eq $aliasesFromCharsetsFile{$otherName}
- && $name le $otherName) {
+ && $aliasesFromCharsetsFile{$canonicalName} eq $aliasesFromCharsetsFile{$otherName}
+ && $canonicalName le $otherName) {
error "mac-encodings.txt lists both $name and $otherName under $MacName, but that aliasing is already specified in character-sets.txt";
}
}
}
# write out
+ emit_line($firstName, $MacName, $flags);
for my $alias (sort keys %aliases) {
- emit_line($alias, $MacName, $flags);
+ emit_line($alias, $MacName, $flags) if $alias ne $canonicalFirstName;
}
} elsif (/^([a-zA-Z0-9_]+)(, (.+))?$/) {
my $MacName = $1;
@@ -132,13 +142,16 @@ sub process_iana_charsets
my $canonical_name;
my @aliases;
+ my %exceptions = ( isoir91 => 1, isoir92 => 1 );
+
while (<CHARSETS>) {
chomp;
if ((my $new_canonical_name) = /Name: ([^ \t]*).*/) {
$new_canonical_name = lc $new_canonical_name;
+ $new_canonical_name =~ tr/a-z0-9//cd;
error "saw $new_canonical_name twice in character-sets.txt", if $seen{$new_canonical_name};
- $seen{$new_canonical_name} = 1;
+ $seen{$new_canonical_name} = $new_canonical_name;
process_iana_charset $canonical_name, @aliases;
@@ -148,11 +161,11 @@ sub process_iana_charsets
next if $new_alias eq "None";
$new_alias = lc $new_alias;
+ $new_alias =~ tr/a-z0-9//cd;
- error "saw $new_alias twice in character-sets.txt", if $seen{$new_alias};
- $seen{$new_alias} = 1;
-
- push @aliases, $new_alias;
+ error "saw $new_alias twice in character-sets.txt $seen{$new_alias}, $canonical_name", if $seen{$new_alias} && $seen{$new_alias} ne $canonical_name && !$exceptions{$new_alias};
+ push @aliases, $new_alias if !$seen{$new_alias};
+ $seen{$new_alias} = $canonical_name;
}
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index c42cf6a..cc0701e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2003-04-24 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ * WebView.subproj/WebViewPrivate.m: (-[WebView _updateWebCoreSettingsFromPreferences:]):
+ Added a call to the new setDefaultTextEncoding: method in WebCore. A preparation
+ step for some encoding bug fixes.
+
+ * WebView.subproj/WebHTMLView.m: (-[WebHTMLView addSuperviewObservers]): Improved a comment.
+
=== Safari-75 ===
=== Safari-74 ===
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 4078a16..51a36cc 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -157,8 +157,9 @@
// of the superview changes. This is different from other scrollable things that don't
// need this kind of thing because their layout doesn't change.
- // We need to pay attention to both height and width because, our "layout" has to change
- // to extend the background the full height of the space.
+ // We need to pay attention to both height and width because our "layout" has to change
+ // to extend the background the full height of the space and because some elements have
+ // sizes that are based on the total size of the view.
NSView *superview = [self superview];
if (superview && [self window]) {
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 8191569..daa0a00 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -422,6 +422,7 @@
[_private->settings setCursiveFontFamily:[preferences cursiveFontFamily]];
[_private->settings setDefaultFixedFontSize:[preferences defaultFixedFontSize]];
[_private->settings setDefaultFontSize:[preferences defaultFontSize]];
+ [_private->settings setDefaultTextEncoding:[preferences defaultTextEncodingName]];
[_private->settings setFantasyFontFamily:[preferences fantasyFontFamily]];
[_private->settings setFixedFontFamily:[preferences fixedFontFamily]];
[_private->settings setJavaEnabled:[preferences isJavaEnabled]];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list