jmintz - Jun 1, 2005 - 10:44 pm
I am trying to change default text encoding in Safari and have followed the instructions in Safari Help - I go to Preferences, Appearance, and then to text encoding panel and click on utf-8, which is the default I want. I want to be able to read chinese characters. But the next time I open a webpage, it goes back to "default" and the characters are garbled. I can change it manually but want it to be the default encoding. What am I doing wrong?
earthsaver - Jun 1, 2005 - 10:48 pm
Try quitting Safari after changing the preference. Does it work after the reopen? Or, trash Safari preferences, open Safari, and reset them as desired. What happens?
- Ben
jmintz - Jun 2, 2005 - 8:37 am
Thanks for your answer. The same thing happens when I close Safari and reopen. As for trashing preferences, I don't know how to do that.
earthsaver - Jun 2, 2005 - 8:41 am
In your Home/Library/Preferences/ folder, find com.apple.Safari.plist. Move it to the trash. Reopen Safari. Set preferences across the board. Test encoding.
- Ben
jmintz - Jun 2, 2005 - 8:58 am
I don't have com.apple.Safari.plist in my Preferences. I have
com.apple.MCX.plist
com.apple.print.FaxPrefs.plist
com.apple.RemoteManagement.plistcom.apple.SetupAssistant.plist
com.apple.sharing.firewall.plist
com.apple.SoftwareUpdate.plist
com.apple.SystemLoginItems.plist
com.apple.windowserver.plist
I have preferences.plist in Systems Configuration. Is that what I should trash?
Jackie
earthsaver - Jun 2, 2005 - 9:00 am
Wrong Preferences folder. You're looking in the one in Library at the top of your hard disk. You need the one in your Home folder (designated by your username, or when you click on Home).
- Ben
jmintz - Jun 2, 2005 - 9:21 am
I found it and deleted it. When I open Safari again and look at the text encoding on the default opening page, it is utf-8. But when I go to the site that contains the Chinese characters, the text encoding has returned to default.
Jackie
earthsaver - Jun 2, 2005 - 9:28 am
I'm about to send your request back to the pool, however I'm curious first what site.
- Ben
jmintz - Jun 2, 2005 - 9:40 am
Does that mean I should expect a message from someone else?
This is a site I've been developping - you can see an unfinished version at
http://student.ccbcmd.edu/~jmintz/CEM_web/index.html. I don't think the problem is in my coding- it looks like other sites that work. But who knows.
Thanks for your help.
earthsaver - Jun 2, 2005 - 9:52 am
When I viewed the page source in OmniWeb, the characters showed properly, but also not on the displayed page. I looked at your HTML tags and noticed the placement of the tags. I noticed two of them just before the Chinese characters but only one closure after them; the second did not appear until after the break and a third tag.
I put a second next to the one right after the characters and redisplayed the page, removing the extra one from the end of the next line . . . and it worked!
- Ben
jmintz - Jun 2, 2005 - 2:08 pm
Well, I did what I think you said you did and it did not work. All it seemed to do was change the font of the dates. I don't really know much about spans - having taken a bit of html and DreamWeaver years ago, I know about tags. (Does the fact that I'm making these pages in DreamWeaver make any difference?) I made the changes and renamed it index2 - did I do what you said? In any case, the same problem shows up in other pages, e.g.
http://student.ccbcmd.edu/~jmintz/CE...ng_munyew.html there are three characters at right of line "pinyin and Chinese characters" which don't show up as characters until I manually change the text encoding.
earthsaver - Jun 2, 2005 - 3:33 pm
On the page you made index2.html, you did half of what I said. You added the tag in the place I suggested but did not take out the extra one at the end of the next line. Here's how that section of code should look:
Chinese Educational Mission
?????????
1872-1881
I don't know enough about HTML to explain the
tag to you either, but it seems to work in this case. On the second page where, for example, you have a problem with Zhong Wen Yao's name, this code works between the tags:
Zhong Wen Yao ???
- Ben
jmintz - Jun 2, 2005 - 5:00 pm
I made the changes in index2.html - It reads exactly as you have it above. But, unfortunately, it still fails to display the Chinese correctly - the text encoding being default - until I change text encoding manually to utf-8. The difference now is that once I change text encoding for that page, the page with Zhong Wen Yao also displays the characters correctly. (I didn't have to make any changes to that.) that's actually a big help.
I don't know how you're getting it to display correctly. That means the text encoding is staying at utf-8, right?
By the way, what is OmniWeb?
earthsaver - Jun 2, 2005 - 6:11 pm
OmniWeb is a more full-featured Web browser, produced since before Mac OS X was born by OmniGroup (omnigroup.com). By default, it uses the text encoding provided by the server (coded into a page). In looking for more information on that, I found your solution: the need for charset=UTF-8 in your meta tag in the header. Seems you already have that, however.
So, here's the problem I discovered in the code. In a number of instances, you have a slash before the ">" character that closes a tag. One of these slashes is right after you define the character set as UTF-8 in the meta tag at the beginning. When I remove the slash (and the space that precedes it for cleanliness), the page displays properly.
So, I encourage you to search your code for " />" (no quotes) and leave yourself only with ">". See what happens. I think it's fine that you're using DreamWeaver, though I doubt for this site you need something so advanced. (I hope it's not causing these glitches.) A simpler application like RapidWeaver might suit you nicely.
- Ben
jmintz - Jun 2, 2005 - 9:06 pm
Well, I got rid of most of the slashes before > (I didn't around the images because there the " />" looks like the standard tag closer, at least in this version of Dreamweaver - and that shouldn't affect the characters in the title.)
Anyway, it didn't work. When you say it's displaying properly, are you opening the page in Safari?
jmintz - Jun 2, 2005 - 9:14 pm
forgot to mention, the latest changes are in index4.html
earthsaver - Jun 2, 2005 - 9:30 pm
I'm using Safari 2.0 (in Tiger), with default encoding set to Western Latin. (Your page sets the encoding to UTF-8.) The page displays fine. As well in OmniWeb, which is using the same rendering engine [display software] as Safari.
It does not, however, display properly in other browsers: FireFox, Camino, Internet Explorer. There must be another way to tell these browsers to make it work; I don't know how to tell you though. We've about reached the end of my Web development experience. You will need to test your site in other browsers before you publicize it.
I'm going to reopen your request to see what insight others have.
- Ben
jmintz - Jun 2, 2005 - 10:20 pm
Thanks very much for your help.
By the way, the original index.html displays properly in Internet Explorer, not in Mozilla.
TechSupport - Jun 5, 2005 - 10:30 pm
This ticket has been moved to the open forums for more exposure.
Please follow this link:
http://www.macosx.com/forums/showthread.php?t=222876