Forum Moderators: open
It's now day 9 in my eternal struggle to post an english site in traditional and simplified chinese. I'm using big5 as my encoding for the traditional site and gb2312 for the simplified. Do I now "have" to specify font types in my CSS?
I do everything in Dreamweaver 2004 and have only this week started spending time in code view so kiddy-gloves would be appreciated.
I've posted a one page example of the site at <snip>
P.S. Bill (hereafter referred to as 'Superman'), if you're out there somewhere, I've read your posts on the matter. I tried that snippet you posted.
<html lang="zh">
<head>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<meta http-equiv="content-language" content="zh">
Does that zh bit have to be there for this to work? I tried it without success. Do I need to re-paste in the text from word each time I change the code? -
[edited by: Woz at 2:55 am (utc) on Nov. 5, 2004]
[edit reason] deleted URL as problem is now fixed. [/edit]
1. pasting from word into html. you need to ensure that word has set the encoding correctly in the first place (microsoft products sometimes have issues if you are not using the localised version; are you using a chinese version of word?). try pasting text into a standard multilingual non-microsoft text editor first, saving as correct encoding, and then moving to html.
2. dreamweaver. some versions of dreamweaver have difficulty using characters other than the language version used. so some English versions of dreamweaver only handles English characters correctly, no matter what the encoding. are you using a Chinese version of dreamweaver?
3. the html lang line should be included. this will ensure that site displays correctly on computers that are set up for multiple languages (e.g. in a student lab or in an internet cafe frequented by travellers) as the previous computer user may have set the "view" "text encoding" to a different charset.
Solutions for future ref:
1. get translation done directly in the source code. as long as translator sets charset at beginning of translation, and works with a true multilingual (or target language) html editor, you should not see these probems.
2. if you have to work between applications (e.g. word to html editor) use unicode, and then you can change back to specific charset.
hope this helps.
Welcome to WebmasterWorld stockstreet!
a2ztranslate has given you some excellent advice. I've seen the exact same thing happen with FrontPage using Chinese and Japanese. My solution when using source materials in Word was to copy and paste the material directly into the HTML editor part of FP, and to avoid the WYSIWYG part of the program altogether.
I assume that the Chinese content looks OK in the source document, right? I'll bet it's the WYSIWYG that's the culprit here.
One thing I have noticed is that I haven't had much luck using NotePad as an HTML editor on an English version of Windows for Japanese or Chinese content. I would suggest that you consider using a 3rd party HTML editor on the side for times when you're entering your double byte content.
If you're entering the Chinese from scratch, i.e., typing it in and not copy & pasting it, then FP or DW seem to be fine even on an English OS. I can type Japanese into FP's WYSIWYG interface just fine. All you need is to have the proper IME in place and you're good to go. It's when you paste from MS Office documents directly into a WYSIWYG editor that you get all this unwanted formatting or gibberish.
<html lang="[b]zh[/b]">
<head>
<meta http-equiv="content-type" content="text/html;charset=[b]gb2312[/b]">
<meta http-equiv="content-language" content="[b]zh[/b]">
The last meta tag there is a holdover from the Netscape days for me. Earlier versions of NN3.x and NN4.x were great at automatically switching the page encoding seamlessly when that tag was in the <head>. Some of today's browsers are a lot better at detecting encoding even without that tag, but I find that I get better consistency when I leave it in. It really beats forcing the user to manually switch encoding on your site.
Try out some of the suggestions here and tell us if you're able to fix the page.
To answer your questions, I'm using a mac with Office 2004 and DW MX 2004, both english versions.
One thing i did forget to do last time was to upload the template that the page at <snip> was based on. My encoding only has to be done on the template, yes? All the pages based on that template will update correctly, yes?
I've moved my text:
?
? ? (this is what I've just pasted from TextEdit). I've pasted it straight into code view in DW and it appears exactly like this, no extra code except for a few <p> tags.
I'm trying to put the <html lang="zh"> line in just before the <head> tag in my template, but DW comes up saying that I have an "Unbalanced #EndEditable tag" which I presume has to do with the fact that I'm using a template. Any ideas?
Also should the <html lang="zh"> line replace <html> or be below it like I've done below. I'm presuming it should not replace it.
<html>
<html lang="zh">
<head>
<meta http-equiv="content-type" content="text/html;charset=big5">
I've also detached the CSS sheet, just in case that was causing any trouble. I appreciate your patience.
Bill, do you have a site i could take a look at?
[edited by: Woz at 2:48 am (utc) on Nov. 5, 2004]
[edit reason] deleted URL as problem is now fixed. [/edit]
should be
content="text/html; charset=big5"
don't know if this will make a difference?
Otherwise looks ok to me, i think that the encoding of the original source translation may have issues?
Just switching the encoding tag on the page isn't going to change the text if it was corrupted to begin with. Maybe DW is changing the Chinese text in some way? Can you try making the page in TextEdit and see if it displays properly? Just keep all the code as-is from DW and put the Chinese in the body. Then view the page in a browser. If that works then there may be a global language setting in DW that is giving you problems.
It really sounds like your original source Chinese text is the culprit. Maybe you have a local Mac font that allows you to see the text?
Your Traditional Chinese page looks OK, but the Simplified Chinese is still looking bad. Does DW have an option for pasting text as Unicode or without formatting? My guess is still Office formatting in the source text.
Is this something obvious that everybody knows except for me?
Thanks for your patience - I really appreciate the effort you guys went to.
glad to see you got it sorted, get yourself an HTML knowledgeable translator next time and save yourself all the pain (we couldnt work any other way!)