Last Comment Bug 237712 - Gecko (? Firefox & Camino) doesn't interpret "macintosh" encoding as "x-mac-roman"
: Gecko (? Firefox & Camino) doesn't interpret "macintosh" encoding as "x-mac-r...
Status: RESOLVED FIXED
: fixed-aviary1.0.1, fixed1.7.6, intl
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: All Mac OS X
: -- normal (vote)
: ---
Assigned To: Jungshik Shin
: Yuying Long
Mentors:
http://newton.kallisys.net:8080/html/...
: 273975 277940 283289 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-16 15:13 PST by Paul Guyot
Modified: 2005-03-01 21:05 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (alias) (648 bytes, patch)
2005-01-17 03:09 PST, Jungshik Shin
smontagu: review+
bzbarsky: superreview+
dveditz: approval‑aviary1.0.1+
dveditz: approval1.7.6+
Details | Diff | Splinter Review

Description Paul Guyot 2004-03-16 15:13:19 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040314 Camino/0.7+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040314 Camino/0.7+

The official name of the MacRoman encoding is macintosh, not x-mac-roman.
However, in Camino and Firefox, I couldn't get a MacRoman-encoded page displayed
properly until the server declares it as x-mac-roman.

Be nice with the example URL, this is a tiny Newton server (on Unix servers, I
only have UTF-8 or iso-8859-1 pages).

I wish Mozilla browsers could render my pages properly and I could also get the
W3C validate them (the validator refuses to validate an x-mac-roman page).

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Christopher Hoess (gone) 2004-03-16 16:38:14 PST
->il8n
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2004-03-16 17:42:07 PST
Should just be a matter of adding an alias, right?
Comment 3 Paul Guyot 2004-03-16 22:15:28 PST
An alias would probably do it indeed since MacRoman pages declared as
x-mac-roman are properly decoded.
Comment 4 Simon Montagu :smontagu 2004-11-09 09:40:41 PST
Ideally we should also use "macintosh" when saving pages and mail messages in
MacRoman. I think "x-mac-roman" is a historical fossil from old versions of
Netscape.
Comment 5 Jungshik Shin 2004-11-09 09:59:48 PST
So, Apple registered 'macintosh' with IANA. Then, we should change the canonical
name to 'macintosh' and made 'x-mac-roman' an alias to that.
Comment 6 Phil Ringnalda (:philor) 2004-12-09 17:40:25 PST
*** Bug 273975 has been marked as a duplicate of this bug. ***
Comment 7 Simon Montagu :smontagu 2005-01-12 01:37:06 PST
*** Bug 277940 has been marked as a duplicate of this bug. ***
Comment 8 Ben Slade 2005-01-13 07:05:52 PST
A few workaround notes for this problem until it gets fixed.  On OS X (10.3.7)
with typical US character encoding settings:

When using Mozilla to view an HTML file saved with MS-Word's default "Western
European (Macintosh)" charset, you can select View->Character Encoding->Western
European (MacRoman) to view the HTML properly in Moz (although View->Page Source
does not pay attention to this, so special characters appear wrong there)  You
can then copy and paste the formatted html into a compose screen and it will
essentially convert it to a typical character set encoding.

Also, for MS-Word 2004 on OS X, you can save a MS-Word doc into an HTML document
using File-Save_As and choosing a Format of "Web Page (HTML)".  When you do
this, the Save File dialog box shows a "Web Options" button. In Web Options you
can select the "Encoding" tab and then choose character sets other than "Western
European (Macintosh)".  Choosing "Western European (Windows)" let me open the
file in Mozilla and display characters properly (including the View->Page Source)
Comment 9 Jungshik Shin 2005-01-13 07:27:23 PST
(In reply to comment #5)
> So, Apple registered 'macintosh' with IANA. Then, we should change the canonical
> name to 'macintosh' and made 'x-mac-roman' an alias to that.

Indeed, it's listed in the IANA charset registry.
(http://www.iana.org/assignments/character-sets). I wonder why x-mac-roman was
chosen in the first place (erik and ftang must have known this....)

Name: macintosh                                           [RFC1345,KXS2]
MIBenum: 2027
Source: The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991


Alias: mac
Alias: csMacintosh

Although there's no doube that we have to fix this, MS Word on Mac OS X should
save, by default, in UTF-8, UTF-8 being 'native' there. 

(In reply to comment #8)
> A few workaround notes for this problem until it gets fixed.  On OS X (10.3.7)
> with typical US character encoding settings:

An easier work-around is to just edit charsetaliases.properties file in 
/Applications/Mozilla.app/Contents/MacOS/res (or the corresponding file for
firefox/camino) to add the following line:

macintosh=x-mac-roman

, which we should have done for branches (aviary 1.0 and 1.7.x)

Comment 10 Erik van der Poel 2005-01-14 10:51:28 PST
It has been a long time since we started using x-mac-roman in late 1994 or
early 1995, but I'm guessing that we used it because "macintosh" hadn't been
registered yet or we didn't know that it had been registered.

It is not a good idea to send documents out over the open Internet with the
Macintosh Roman charset. It is much better to use US ASCII, ISO 8859-1, UTF-8
or even Windows 1252.

In any case, Mozilla's aliases should equate "macintosh" and "x-mac-roman".
Comment 11 Jungshik Shin 2005-01-17 03:09:00 PST
Created attachment 171486 [details] [diff] [review]
patch (alias)

Let me steal it from smontagu. This is a trivial  fix and should go in for
branches as well.
Later, we may consider making 'macintosh' the canonical name.
Comment 12 Simon Montagu :smontagu 2005-01-17 03:55:13 PST
Comment on attachment 171486 [details] [diff] [review]
patch (alias)

I'll forgive you for stealing for me this once ;-)
Comment 13 Boris Zbarsky [:bz] (still a bit busy) 2005-01-17 08:37:13 PST
Comment on attachment 171486 [details] [diff] [review]
patch (alias)

Sure.  sr=bzbarsky
Comment 14 Christian :Biesinger (don't email me, ping me on IRC) 2005-01-17 09:26:29 PST
+# XXX: should make macinsoth the canonical name later

that should probably be macintosh?
Comment 15 Daniel Veditz [:dveditz] 2005-02-17 16:26:22 PST
Comment on attachment 171486 [details] [diff] [review]
patch (alias)

a=dveditz for branches. Please land quickly and add the fixed-aviary1.0.1 and
fixed1.7.6 keywords when checked in.
Comment 16 OstGote! 2005-02-23 06:18:21 PST
*** Bug 283289 has been marked as a duplicate of this bug. ***
Comment 17 Simon Fraser 2005-03-01 21:01:36 PST
> +# XXX: should make macinsoth the canonical name later
"macinsoth" ?
Comment 18 Jungshik Shin 2005-03-01 21:05:11 PST
see comment #14. when landing, i fixed it.

Note You need to log in before you can comment on or make changes to this bug.