thai-language.comInternet resource
for the Thai language
Lookup:
» more options here
Browse

F.A.Q. Check out the list of frequently asked questions for a quick answer to your inquiry

e-mail the author
guestbook
site settings
site news
bulk lookup
Bangkok


mostly cloudy
82 F (28 C)
r.h.: 78%
bar: 29.74"
[5/19 @ 4:00am]
Thanks for your

recent donations!

Narisa N. $+++!
John A. $+++!
Mike A. $100!
Eric B. $100!
John Karl L. $100!
Don S. $100!
John S. $100!
Peter B. $100!
Ingo B $50
Peter d C $50
Hans G $50
Alan M. $50
Rod S. $50
Wolfgang W. $50
Bill O. $70
Ravinder S. $20
Chris S. $15
Jose D-C $20
Steven P. $20
Daniel W. $75
Rudolf M. $30
David R. $50
Judith W. $50
Roger C. $50
Steve D. $50
Sean F. $50
Paul G. B. $50
xsinventory $20
Nigel A. $15
Michael B. $20
Otto S. $20
Damien G. $12
Simon G. $5
Lindsay D. $25
David S. $25
Laurent L. $40
Peter van G. $10
Graham S. $10
Peter N. $30
James A. $10
Dmitry I. $10
Edward R. $50
Roderick S. $30
Mason S. $5
Henning E. $20
John F. $20
Daniel F. $10
Armand H. $20
Daniel S. $20
James McD. $20
Shane McC. $10
Roberto P. $50
Derrell P. $20
Trevor O. $30
Patrick H. $25
Rick @SS $15
Gene H. $10
John S. $100!
Aye A. M. $33
S. Cummings $25
Will F. $20
Siriwat T. $5
Get e-mail

Sign-up to join our mail­ing list. You'll receive e­mail notification when this site is updated. Your privacy is guaran­teed; this list is not sold, shared, or used for any other purpose. Click here for more infor­mation.

To unsubscribe, click here.

for webmasters using Thai text

Browser/website issues and working with Thai sound and video clips

Moderator: daฟาน

for webmasters using Thai text

Postby dharmathai » Sun Apr 12, 2009 10:20 pm

Ever opened a Thai web page and saw a load of jumbled letters? then have to use the browser to choose the encoding in order to be able to read the text?

there is a common problem with displaying text in webpages that are in thai because most webmaster lessons in thai teach the webmaster to declare a tis-620 encoding in the metas of the head of the html of the page.. this is erroneous and causes the browser to display a load of danish looking noughts and crosses. Most Thai webmasters declare a tis-620 encoding in their pages, instead of the correct windows-874.
The only way to display Thai automatically in a browser is to declare a windows-874 encoding in the head of the html page you are designing..
So often do i open a website in thai and the text doesnt display and have to go to "view\character encoding\thai-windows, to display it.. evry click on a link to the nextr page will revert to the jumbled letters again and the view\character encoding\thai-windows action must be repeated on every pagechange or refresh...
So, if you are webmaster, then remember to declare the encoding as windows-874 and your pages will always display perfectly

unfortunately even on this site there is a page saying

this choice of "codepage" is not self-identifying, which means that an out-of-band mechanism must be used to tell the browser what's going on. There are two ways to do this; one seems more important than the other. The most important thing is to include the following at the top of your HTML file:

(put opening tag here)meta http-equiv="Content-Type" content="text/html; charset=tis-620">(put closing tag here)

- This is COMPLETELY ERRONEOUS!!
here is the correct meta tag below
(put opening tag here) meta http-equiv="Content-Type" content="text/html; charset=windows-874" (put closing tag here)

if you wish to be xml/xhtml friendly with the tag then you should do this (i recommend it as most sites are now xml ready)
(put opening tag here)meta http-equiv="Content-Type" content="text/html; charset=windows-874" /(put closing tag here).
In case you don't know what i mean by "put opening tag here" (the forum wont let me use the full code), here is what an dopening tag looks like;
<
a closing one is so;
>
ทุกขัง อนิจจัง อนัตตา
dharmathai
 
Posts: 28
Joined: Sun Apr 12, 2009 12:00 am
Location: Bangkok

for webmasters using Thai text

Postby mo3s » Mon Apr 13, 2009 11:01 am

I am confused here. I use asp.net and i enter a charset on the page_load like this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Charset = "tis-620"
End Sub

All characters i put on my website are displayed correctly (I see thai, not danish). My browser (IE 7) switches to thai automatically. I don't see the problem...am I wrong here?

I this is correct could someone correct the text on the [resource] page...

Is Response.Charset = "windows-874" really the way to go?
mo3s
 
Posts: 2
Joined: Mon Apr 13, 2009 12:00 am

for webmasters using Thai text

Postby Glenn Slayden » Mon Apr 13, 2009 12:42 pm

This website uses "tis-620" and I don't get any complaints. You can check it yourself by viewing the page source for any page on this website and you'll see this:

meta http-equiv="Content-Type" content="text/html; charset=tis-620"

On the other hand, I did get complaints from Mac users many years ago when using "Windows-874." Nowadays, there's nothing wrong with using either one.

The true problem arises when a site does not have the HTTP headers configured properly, which is a totally separate issue. These headers are not visible in the page source, they must be set on the web server to something like this:

Content-Type: text/html; charset=tis-620
Image
User avatar
Glenn Slayden
Site Admin
 
Posts: 978
Joined: Mon Jul 09, 2001 12:00 am

for webmasters using Thai text

Postby Glenn Slayden » Mon Apr 13, 2009 12:44 pm

mo3s wrote:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Charset = "tis-620"
End Sub

This code, running on the server, sets the HTTP header. See my message above. With this code, you probably don't even need to use 'meta' in the page source.
Image
User avatar
Glenn Slayden
Site Admin
 
Posts: 978
Joined: Mon Jul 09, 2001 12:00 am


Return to Browsers, Web Sites, Web Authoring, Multimedia

Who is online

Users browsing this forum: No registered users and 1 guest

Copyright © 2013 thai-language.com. Portions copyright © by original authors, rights reserved, used by permission; Portions 17 USC §107.