Skip to content

Commit

Permalink
Use GBK as fallback, not gb18030
Browse files Browse the repository at this point in the history
It's equivalent for decoding, but gives more conservative encoding that's likely to be more compatible.

Fixes whatwg#4557.
  • Loading branch information
annevk authored Oct 13, 2021
1 parent 6390210 commit 9fa2a91
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -106347,15 +106347,15 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
compatibility with legacy content. Locales are identified by BCP 47 language tags. <ref spec=BCP47> <ref spec=ENCODING></p>

<!-- based on three sources:
1. mozilla 1.9.1 localizations: http://mxr.mozilla.org/l10n-mozilla1.9.1/find?string=global%2Fintl.properties&tree=l10n-mozilla1.9.1&hint= (though this data was apparently misinterpreted in some cases)
2. windows vista encodings: http://msdn.microsoft.com/en-us/goglobal/bb896001
3. chrome encodings: https://code.google.com/p/chromium/codesearch#search/&q=IDS_DEFAULT_ENCODING
1. Mozilla 1.9.1 localizations: http://mxr.mozilla.org/l10n-mozilla1.9.1/find?string=global%2Fintl.properties&tree=l10n-mozilla1.9.1&hint= (though this data was apparently misinterpreted in some cases)
2. Windows Vista encodings: http://msdn.microsoft.com/en-us/goglobal/bb896001
3. Chrome encodings: https://code.google.com/p/chromium/codesearch#search/&q=IDS_DEFAULT_ENCODING
several assumptions were made in this process; amongst them:
- ISO-8859-1 and windows-1252 are the same (supported by encoding.spec.whatwg.org)
- ISO-8859-9 and windows-1254 are the same (supported by encoding.spec.whatwg.org)
- windows-31J and Shift_JIS are the same (supported by encoding.spec.whatwg.org)
- windows-932 is close enough to Shift_JIS to be treated as equivalent (supported by wikipedia)
- windows-936 is a basically a subset of GBK which is basically a subset of gb18030 (supported by wikipedia)
- windows-936 is basically the same as GBK which is a subset of gb18030 (supported by wikipedia), but use GBK for its conservative encoder
- windows-950 is basically the same as Big5 (supported by wikipedia)
- Firefox's UTF-8 defaults are all bogus
-->
Expand Down Expand Up @@ -106722,17 +106722,17 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
<tr>
<td>zh-CN
<td>Chinese (People's Republic of China)
<td><span>gb18030</span> <!-- Windows Vista, Chrome, and Firefox agreed -->
<td><span>GBK</span> <!-- Windows Vista, Chrome, and Firefox agreed -->

<!-- zh-HK, Chinese (Hong Kong S.A.R.), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted Big5 -->

<!-- zh-Hans, Chinese (Simplified), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted gb18030 -->
<!-- zh-Hans, Chinese (Simplified), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted GBK -->

<!-- zh-Hant, Chinese (Traditional), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted Big5 -->

<!-- zh-MO, Chinese (Macao S.A.R.), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted Big5 -->

<!-- zh-SG, Chinese (Singapore), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted gb18030 -->
<!-- zh-SG, Chinese (Singapore), is not listed here because neither Chrome nor Firefox knew about it. For what it's worth, Windows Vista wanted GBK -->

<tr>
<td>zh-TW
Expand Down Expand Up @@ -107138,7 +107138,7 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
<dfn data-x-href="https://encoding.spec.whatwg.org/#windows-1256">windows-1256</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#windows-1257">windows-1257</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#windows-1258">windows-1258</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#gb18030">gb18030</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#gbk">GBK</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#big5">Big5</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#iso-2022-jp">ISO-2022-JP</dfn>,
<dfn data-x-href="https://encoding.spec.whatwg.org/#shift_jis">Shift_JIS</dfn>,
Expand Down

0 comments on commit 9fa2a91

Please sign in to comment.