Bug 4362 - Add mac-cyrillic to the list of encodings
Summary: Add mac-cyrillic to the list of encodings
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Adele Peterson
URL: http://www.sbrf.ru/
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 13:13 PDT by Alexey Proskuryakov
Modified: 2005-12-14 11:02 PST (History)
0 users

See Also:


Attachments
proposed patch (616 bytes, patch)
2005-12-13 22:14 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2005-08-09 13:13:04 PDT
This site (one of the largest banks in Russia) sends charset=mac-cyrillic
instead of x-mac-cyrillic. Safari doesn't support such an alias.

I have tried adding an alias to WebCore/kwq/mac-encodings.txt, but for whatever
reason, this makes the build fail:

MacCyrillic: x-mac-cyrillic, mac-cyrillic, xmacukrainian

    /bin/sh -c
/Users/ap/WebKit/WebKitBuild/WebCore.build/Deployment/WebCore.build/Script-932FC0D20824A2C4005B3C75.sh
mac-cyrillic, in mac-encodings.txt, has illegal characters in it (must be all
lowercase alphanumeric)

Also, xmacukrainian (and x-mac-ukrainian) look like aliases to MacUkrainian, not
MacCyrillic.
Comment 1 Alexey Proskuryakov 2005-10-01 13:39:14 PDT
The make-charset-table issue may have been obsoleted by switching to ICU (I'm not really sure, though).

I have filed a request to add mac-cyrillic as an ICU Jitterbug 4859 (<http://dev.icu-project.org/cgi-bin/
icu-bugs>).
Comment 2 Darin Adler 2005-12-13 19:33:32 PST
All you have to do is add "maccyrillic" without the hyphen. Non-alphanumeric characters are ignored when 
doing the table match and only the first item in each table is allowed to contain them (because it's used in 
reverse-mapping an encoding to its name).

So fixing this bug is as simple as adding that element to the table.
Comment 3 Alexey Proskuryakov 2005-12-13 22:14:55 PST
Created attachment 5072 [details]
proposed patch

Thank you, I didn't grasp the difference between the first and subsequent
elements :)

I'm left wondering about rdar://3327157 (x-mac-ukrainian should be mapped to
MacCyrillic) - could it be a workaround for some problem that no longer exists?
Comment 4 Alexey Proskuryakov 2005-12-13 22:28:23 PST
A layout test is probably not necessary here (there are no tests for the presence of charset aliases) - 
correct me if I'm wrong.
Comment 5 Darin Adler 2005-12-14 09:41:30 PST
Comment on attachment 5072 [details]
proposed patch

r=me
Comment 6 Adele Peterson 2005-12-14 10:18:03 PST
I've committed this.