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
Thanks for your

recent donations!

Narisa N. $+++!
John A. $+++!
Paul S. $100!
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
Aye A. M. $33
S. Cummings $25
Will F. $20
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.

Creating Thai webpages for Opera

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

Moderator: acloudmovingby

Creating Thai webpages for Opera

Postby littlemissweb » Fri Feb 06, 2009 5:13 am

Hi

I would be truly grateful if anyone could help me with my Thai website in Opera problem. The site I'm creating comes out just fine in IE and Mozilla, but in Opera there seems to be a problem with the line-breaking (although according to the Opera website, line-breaking for Asian text is supported)?

My encoding is unicode UTF-8, have left justified text, have specifed Angsana New in stylesheet (css).

What else do I have to do? My page is at: http://www.vectra-intl.com/thai/index_hold2.htm

I'm going nuts with this! :x Someone save me!

Thx
littlemissweb
 
Posts: 2
Joined: Fri Feb 06, 2009 12:00 am
Location: Brussels

Creating Thai webpages for Opera

Postby Glenn Slayden » Fri Feb 06, 2009 4:47 pm

Firefox had this problem with Thai text until recently. It would not break lines of Thai unless you installed a plug-in. It's fixed for Firefox on a default installation now but it sounds like Opera is not. What OS are you running Opera on? Mac, Windows, or Linux? I'd guess that this is a problem with Opera that there's no easy solution for, and if you must get it working in your app then you'll have to manually put spaces in the Thai text at the server.

Glenn
Image
User avatar
Glenn Slayden
Site Admin
 
Posts: 988
Joined: Mon Jul 09, 2001 12:00 am

Creating Thai webpages for Opera

Postby littlemissweb » Mon Feb 09, 2009 1:45 am

Thanks Glenn.

Yeah, I don't think this is easily solvable. I've just been looking at lots of Thai websites in Opera and I haven't found a single one that displays the text properly.

Well, now I know it's not just me... !
littlemissweb
 
Posts: 2
Joined: Fri Feb 06, 2009 12:00 am
Location: Brussels

Creating Thai webpages for Opera

Postby Richard Wordingham » Sun Mar 08, 2009 9:07 pm

littlemissweb wrote:Thanks Glenn.
Yeah, I don't think this is easily solvable. I've just been looking at lots of Thai websites in Opera and I haven't found a single one that displays the text properly.

There is a fallback solution. You could mark the word boundaries explicitly with U+200B ZERO WIDTH SPACE (ZWSP), which is a word separator intended for use in languages like Thai. I have seen pages that use it.

It's also the only solution for other languages written in the Thai script. There is at least one extension of TIS-620 which includes it.

Typing could be a bit painful. The Khmeros keyboard for Khmer uses the plain space bar to insert ZWSP, and shift-space to insert a space. I'm not sure what you'd lose if you wrote your own keyboard mapping for Thai.
One could easily lose the protection against input of invalid sequences, though that was overdone in Windows XP - you couldn't type Pali or Sanskrit in the Thai script!
Richard Wordingham
 
Posts: 1294
Joined: Mon Feb 14, 2005 12:00 am
Location: Stevenage, England

Creating Thai webpages for Opera

Postby Glenn Slayden » Mon Mar 09, 2009 11:30 am

Richard,

Are you suggesting that this website insert U+200B between every Thai word in a sentence? I suppose I could but I'd probably only enable this for Opera, and such web pages might balloon because I don't think that character has a TIS-620 equivalent and this site still transmits all its pages in TIS-620. Characters which are not in that character set have to use a 7-byte HTML "entity" sequence of the form: &#nnnn;
Image
User avatar
Glenn Slayden
Site Admin
 
Posts: 988
Joined: Mon Jul 09, 2001 12:00 am

Creating Thai webpages for Opera

Postby Richard Wordingham » Mon Mar 09, 2009 1:38 pm

Glenn Slayden wrote:Are you suggesting that this website insert U+200B between every Thai word in a sentence? ... this site still transmits all its pages in TIS-620. Characters which are not in that character set have to use a 7-byte HTML "entity" sequence of the form: &#nnnn;

I was actually answering Littlemissweb's query - as she is using UTF-8, ZWSP would be a small overhead for her.

When this sort of issue is raised, the guys at Unicode usually respond that text is typically a very small part of what is found on a website. Well, this is a text-oriented site, but it uses a great deal of mark-up, so I did an experiment.

I did a dictionary look-up for อร่อย and according to my browser, I got a 50,861 byte page. I found 6 Thai-Thai word breaks - so adding U+200B would be a 42-byte overhead. (I may be missing something important - don't you have a mechanism for reducing the transmission overhead?)

Interestingly, MacThai does include a code for ZWSP, namely 0xDC, so perhaps Apple do expect people to use ZWSP.
Richard Wordingham
 
Posts: 1294
Joined: Mon Feb 14, 2005 12:00 am
Location: Stevenage, England

Creating Thai webpages for Opera

Postby Glenn Slayden » Tue Mar 10, 2009 1:00 pm

Ok, your point is well taken. I guess I was really worried about breaking something. But I will look into this. Thanks,

Glenn
Image
User avatar
Glenn Slayden
Site Admin
 
Posts: 988
Joined: Mon Jul 09, 2001 12:00 am

Creating Thai webpages for Opera

Postby Richard Wordingham » Tue Mar 10, 2009 4:13 pm

One possible drawback of using ZWSP is that I'm not sure how older browsers and fonts would handle it. Word XP does not take kindly to it, and I remember being shocked by displays of ZWJ and CGJ in Caesar (English) and Llangollen (Welsh) - though some think you should spell the former as 5 characters - C<aelig>sar, not 7. (I've forgotten how do non-TIS-620 characters on the forum.)
Richard Wordingham
 
Posts: 1294
Joined: Mon Feb 14, 2005 12:00 am
Location: Stevenage, England

Creating Thai webpages for Opera

Postby dharmathai » Mon Apr 13, 2009 10:30 pm

i solved this in a simpler manner
basically defining the width of the P tag using css and then putting a break between words every so often, as is being done in Modern Thai these days anyway. this works for me in all browsers.I do admit that you may get the odd line in a paragraph that is shorter than others, but it is a simple solution without having to worry about how other peoples os or browsers are set up.. remember it is useless to set your own pc to display the page well when this won't be affecting how other peoples pcs and browsers interpret the page.. so it is best to use a universal solution, that will result in a similar appearance for everyone.. this is anyway a real problem for webmasters. I solve most of my display problems using what i call "dynamic css" - using absolute widhts and positionings as well as z-index to make sure that layers are displayed in the right sequence.
Lastly, try using windows-874 for your encoding, as not all browsers will automatically show the utf8 encoding without first going to view\encoding\utf etc on the browser tools.
windows-874 will always automatically display in all browsers
ทุกขัง อนิจจัง อนัตตา
dharmathai
 
Posts: 28
Joined: Sun Apr 12, 2009 12:00 am
Location: Bangkok

Creating Thai webpages for Opera

Postby dharmathai » Mon Apr 13, 2009 10:40 pm

ok i had a look at your source code;
firstly you are using separate p tags for each line of text.. put them all in one p tag not many and define the width of the p tag either using css classes or ids - or if not use inline css or html width commands to control the width of the paragrap (p tag) - then put breaks every 3 or four words and it should work so long as you dont string long lines of text with no breaks .
that's all you need to do.
Apart from this dont use tables to enclose the p tags it will cause some browsers to position differently and will also screw up the width.. don't ask me why but i notice firefox, opera and ie 6 and 7 react differently displaying tables.
i stoppedusing then unless absolutely necessary.
ทุกขัง อนิจจัง อนัตตา
dharmathai
 
Posts: 28
Joined: Sun Apr 12, 2009 12:00 am
Location: Bangkok

Next

Return to Browsers, Web Sites, Web Authoring, Multimedia

Who is online

Users browsing this forum: No registered users and 0 guests

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