PDA

View Full Version : Vietnamese text website



chuco61
08-15-2008, 09:51 PM
Im coding an HTML site that needs to be in Vietnamese.

What do i have to do to make the site load properly in Vietnamese every time?

techno_race
08-15-2008, 11:06 PM
If, in your <head> section, you see:

<meta http-equiv="Content-Type" content="text/html; charset=something">, change it to:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Otherwise, just put:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
in your <head> section.
Then you can just put the Vietnamese characters (or any characters) directly into the code.

Twey
08-16-2008, 09:02 PM
This will not necessarily help. You must have your server serve the correct Content-Type header. See the W3C validator FAQ entry (http://validator.w3.org/docs/help.html#faq-charset) on the subject.

jscheuer1
08-17-2008, 12:06 PM
This will not necessarily help. You must have your server serve the correct Content-Type header. See the W3C validator FAQ entry (http://validator.w3.org/docs/help.html#faq-charset) on the subject.

Twey, I'm not sure on this one, but isn't it also true that the browser, regardless of how the page is served, must support the Asian characters?

Twey
08-17-2008, 04:12 PM
No -- not unless they are encoded as HTML entities (blowing the page size up to anything up to about eight times, in many cases). The HTTP Content-Type header must always override the <meta> tag, and the <meta> tag is only capable of setting ASCII-compatible encodings (since the browser must be able to read that far in the first place). Despite what many people seem to think, the only way that a <meta> tag could be useful like that is if the webserver serves no encoding with its Content-Type header, which would be a sign of a broken webserver configuration in my eyes (since there are documents that can be served from a webserver for which it is not possible to specify an encoding in the document itself). This <meta> tag is only there in case the user saves the page locally and re-opens it later, in which case the browser will not have the Content-Type header to go by.

jscheuer1
08-17-2008, 10:32 PM
Thanks Twey. I was wondering about it because I had to add fonts or something at one one point to see your:


Location: 英国

properly.

So you are saying that any browser will see the Asian characters if served as such. I do recall that before adding the support (whatever it was) to see your location thing, that some sites I loaded did display Asian characters. I guess that they were being served properly for those characters. No way (from my limited perspective in this regard) for me to know for sure though, they could have been entities.

Twey
08-17-2008, 11:00 PM
That was a case of your system not having the appropriate fonts. Vietnamese is written in a Latinate script, and should be supported in most Western fonts.

jscheuer1
08-17-2008, 11:11 PM
That was a case of your system not having the appropriate fonts. Vietnamese is written in a Latinate script, and should be supported in most Western fonts.

Just to be painfully clear for both myself and others -

If the page is served with the proper encoding:

Yes, the user must have the required fonts installed.

or:

No, the user fonts are immaterial.

techno_race
08-17-2008, 11:49 PM
Both.

ti t hiểu tiếng Việt
This string contains ể and ệ, which are not supported in most fonts.
However, Arial and Times New Roman support them. One of these fonts is available on almost all systems with a GUI.

Twey
08-18-2008, 12:00 AM
Yes, of course one cannot see any text without the appropriate fonts. However, I think that Vietnamese text will be viewable with only the default fonts on most common operating system installations.

techno_race
08-18-2008, 03:08 AM
As I said.

Twey
08-18-2008, 03:41 AM
Aye, sorry, just rephrasing.

chuco61
08-18-2008, 06:20 PM
so basically from reading the posts, i can get by through changing the meta tags at the head?

Twey
08-18-2008, 07:17 PM
No, as I said:
This will not necessarily help. You must have your server serve the correct Content-Type header. See the W3C validator FAQ entry (http://validator.w3.org/docs/help.html#faq-charset) on the subject.