Closed Bug 802059 Opened 9 years ago Closed 9 years ago

Implement labels for existing encodings from the encoding spec


(Core :: Internationalization, enhancement)

Not set





(Reporter: ayg, Assigned: ayg)





(1 file)

I tested how we parse all the labels in the encoding spec.  Here are a bunch of labels that we don't support, but other browsers do.

First, the spec says windows-949 should be an alias for euc-kr.  WebKit recognizes it, IE doesn't.

Second, here's a whole list of labels that the spec mandates and IE and WebKit recognize, but we don't:

iso_8859-1:1978: windows-1252 (see bug 802030)
iso_8859-2:1987: iso-8859-2
iso_8859-3:1988: iso-8859-3
iso_8859-4:1988: iso-8859-4
iso_8859-5:1988: iso-8859-5
iso_8859-6:1987: iso-8859-6
iso_8859-7:1987: iso-8859-7
iso_8859-8:1988: iso-8859-8
iso_8859-9:1989: windows-1254 (similar to bug 802030)

csisolatin9, l9: iso-8859-15 (we recognize all the other csisolatin* and l* it defines, so I don't know why this one is different)

cskoi8r, koi, koi8: koi8-r
dos-874: windows-874
cn-big5: big5
sjis: shift_jis
Also, "logical" is a label for iso-8859-8-i.  WebKit implements it per spec, while IE implements it as a label for iso-8859-8 (I don't think it implements iso-8859-8-i).  I think that's it, but I might have missed some more.
Attached patch PatchSplinter Review
I'm planning on submitting tests for this upstream at the W3C, maybe as early as today, and if I do they'll get synced back to us at some point.  But I have to do some more work to get the tests usable (currently they rely on a PHP script), and I can't absolutely promise that will happen, so I won't mark in-testsuite+ yet.  Tell me if you want tests for this, and if so, how to write them.  Upstream I'm loading lots of iframes with <meta charset> in them, which is a bit inelegant . . .
Assignee: nobody → ayg
Attachment #671777 - Flags: review?
Comment on attachment 671777 [details] [diff] [review]

Review of attachment 671777 [details] [diff] [review]:

::: intl/locale/src/
@@ -134,5 @@
>  iso8859-11=ISO-8859-11
>  iso8859-13=ISO-8859-13
>  iso8859-14=ISO-8859-14
>  iso8859-15=ISO-8859-15
> -# Currently .properties cannot handle : in key

I wonder how long this has not been true :)
Attachment #671777 - Flags: review?(smontagu) → review+
(In reply to :Aryeh Gregor from comment #2)
> Tell me if you want tests for this, and if
> so, how to write them.  Upstream I'm loading lots of iframes with <meta
> charset> in them, which is a bit inelegant . . .

Please add the new aliases to the existing tests in intl/uconv/tests/unit/test-[en|de]code_*.js. (FTR, those use nsIScriptableUnicodeConverter; I don't know a better cross-browser way to test this stuff than iframes with <meta charset>, I'm afraid)
Done, but KOI8-R, ISO-8859-8-I, Shift_JIS, and Big5 didn't seem to have tests with that naming pattern, so I didn't do anything for them.
Flags: in-testsuite+
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.