Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

International character support in Safari and Mail System
For the longest time I had trouble figuring out how to get the Safari default text encodings to work well with my Hungarian characters. I was having the following problems:
  1. Forms that I submitted had "?" marks where there were supposed to be special Hungarian characters
  2. Mail that I sent with these characters arrived jumbled up for Outlook Express users, Yahoo Mail users, etc.
So I finally found the solution; this will work for all supported languages and text encodings. First go to Mac OS X's Preferences, and select the International Pane. Under Language, add the appropriate one, and drag it to the top (so that it is first). Under Formats, select the appropriate region, and under the Input Menu, add the appropriate language. We're done with the easy part.

At this point, some languages should already work fine. Others (like Hungarian) need a little more work. Open up Terminal (in Applications -> Utilities), and type:
sudo defaults write com.apple.mail WebKitDefaultTextEncoding ISO-8859-2
Replace ISO-8859-2 with the appropriate encoding needed for your language. Then type:
sudo defaults write com.apple.Safari WebKitDefaultTextEncoding ISO-8859-2
And again, substitute the correct encoding. Now log out and log back in. Both Safari and Mail should now work perfectly. Good luck!

[robg adds: I don't think that the sudo should be required, as this is simply changing a preference in the user's domain, and make sure neither app is running when you execute those commands. I have not tested this hint.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,575 views]  

International character support in Safari and Mail | 5 comments | Create New Account
Click here to return to the 'International character support in Safari and Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
International character support in Safari and Mail
Authored by: fds on Sep 17, '04 11:18:44AM

As for Safari:

There isn't a problem as long as the web site in question is properly made and specifies the character encoding either in the HTTP headers or inside HTML meta headers.

The default encoding setting only comes into play if the site's author neglected to correctly specify the encoding. Instead of going to the Terminal, it can easily be configured in Safari's Preferences on the Appearance tab.

No setting outside Safari needs to be changed.


As for Mail:

Mail automatically tries to determine the ideal character encoding which is sufficient to represent the characters you are trying to send. This automatic method does seem to be influenced by the list of languages you added to System Preferences - International - Languages.

For example staying with this hint's Hungarian, if only U.S. English is added as a language, Mail will send Hungarian messages encoded as utf-8. If "Magyar" is added to the list of languages, Mail will prefer iso-8859-2 and windows-1250 over utf-8 if possible. The order of the list of languages doesn't matter and you can safely leave U.S. English on top.

Note that in all cases, including utf-8, Mail properly encodes everything and if it doesn't show up correctly on the other side, the bug isn't in Mail.
Outlook Express on Windows in earlier versions had some trouble handling utf-8 messages. Recent versions seem to be fine, and the "big" Outlook wasn't affected.


In summary I find this hint somewhat misleading in suggesting that special settings are necessary for the proper sending of national characters.



[ Reply to This | # ]
International character support in Safari and Mail
Authored by: dovale on Sep 23, '04 08:02:27AM

Sometime I'm using Safari to access Hebrew language sites. I've set the default language encoding in Safari to Hebrew (Windows). The 'home' page of every Hebrew language site is displayed correctly, but when I try to open a link in a new Tab I get jigibrish. In order to correct it, I have to go to View > Text Encoding > Hebrew (Windows). It's all quite tiresome.

Any ideas?

Thanks,
Benny Brunner



[ Reply to This | # ]
Making web sites UTF-8 ready (for developers)
Authored by: rhahn on Sep 17, '04 12:30:01PM

fds made a great comment about the browsers, and so saved me the effort. If you are a web developer and want to learn more about how to ensure your pages are accessible by international audiences, for both seeing your data, and for helping them submit UTF-8 encoded data, feel free to visit my blog posting on the subject.



[ Reply to This | # ]
Default encoding for composition?
Authored by: bedouin on Sep 17, '04 10:25:53PM

Does this hint change the default encoding when composing in Mail app from default, to what ever you specify? I haven't had any problems with international characters in Mail or Safari, so I didn't apply this hint. However I have heard some people complaining that a default text encoding for composition cannot be set in Mail app, and this hint could be one way to accomplish that. Is it?



[ Reply to This | # ]
International character support in Safari and Mail
Authored by: dovale on Sep 23, '04 09:56:47AM

Sometime I'm using Safari to access Hebrew language sites. I've set the default language encoding in Safari to Hebrew (Windows). The 'home' page of every Hebrew language site is displayed correctly, but when I try to open a link in a new Tab I get jigibrish. In order to correct it, I have to go to View > Text Encoding > Hebrew (Windows). It's all quite tiresome.

Any ideas?

Thanks,
Benny Brunner



[ Reply to This | # ]