Closed Bug 237712 Opened 20 years ago Closed 19 years ago

Gecko (? Firefox & Camino) doesn't interpret "macintosh" encoding as "x-mac-roman"

Categories

(Core :: Internationalization, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: pguyot, Assigned: jshin1987)

References

()

Details

(Keywords: fixed-aviary1.0.1, fixed1.7.6, intl)

Attachments

(1 file)

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.
->il8n
Assignee: parser → smontagu
Component: HTML: Parser → Internationalization
QA Contact: amyy
Should just be a matter of adding an alias, right?
An alias would probably do it indeed since MacRoman pages declared as
x-mac-roman are properly decoded.
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.
So, Apple registered 'macintosh' with IANA. Then, we should change the canonical
name to 'macintosh' and made 'x-mac-roman' an alias to that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: intl
*** Bug 273975 has been marked as a duplicate of this bug. ***
*** Bug 277940 has been marked as a duplicate of this bug. ***
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)
(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)

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".
Attached patch patch (alias)Splinter Review
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.
Assignee: smontagu → jshin1987
Status: NEW → ASSIGNED
Attachment #171486 - Flags: superreview?(bzbarsky)
Attachment #171486 - Flags: review?(smontagu)
Attachment #171486 - Flags: approval1.7.6?
Attachment #171486 - Flags: approval-aviary1.0.1?
Comment on attachment 171486 [details] [diff] [review]
patch (alias)

I'll forgive you for stealing for me this once ;-)
Attachment #171486 - Flags: review?(smontagu) → review+
Comment on attachment 171486 [details] [diff] [review]
patch (alias)

Sure.  sr=bzbarsky
Attachment #171486 - Flags: superreview?(bzbarsky) → superreview+
+# XXX: should make macinsoth the canonical name later

that should probably be macintosh?
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.
Attachment #171486 - Flags: approval1.7.6?
Attachment #171486 - Flags: approval1.7.6+
Attachment #171486 - Flags: approval-aviary1.0.1?
Attachment #171486 - Flags: approval-aviary1.0.1+
*** Bug 283289 has been marked as a duplicate of this bug. ***
> +# XXX: should make macinsoth the canonical name later
"macinsoth" ?
see comment #14. when landing, i fixed it.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: