Re: Displaying Arabic Texts as Image (Problems: arabic chars is reversed?)

From: Date: Wed, 18 Oct 2006 16:08:38 +0000
Subject: Re: Displaying Arabic Texts as Image (Problems: arabic chars is reversed?)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-243299@lists.php.net to get a copy of this message
On Tue, October 17, 2006 8:10 pm, Louie Miranda wrote: > <?php > header("Content-type: text/html; charset=utf-8"); > ?> IE doesn't belive in standard headers, so you'll want a META tag as well, which it DOES trust. I guess Microsoft thinks web Designers know more about character sets than web Programmers. They may have a point there... :-) > My problem is, whenever i display arabic characters like this one.. > http://unicode.org/standard/translations/arabic.html (from) > > * ما هي الشفرة الموحدة > "يونِكود" ؟* > > On the input box.. > > <input type="hidden" name="line_1_2" value=" ما هي > الشفرة > الموحدة "يونِكود" ؟"> > > Nothing has changed.. But the image generated was.. > http://public.axishift.com/arabic_reverse.jpg > > And its really weird, its reversing by itself. > > Some lines i used to display the text on an image. > > imagettftext($background, 8, 0, 18, 140, $black, "fonts/$fonts", > "$line_4"); I have no idea if imagettftext is "aware" of right-to-left and left-to-right language differences, but something like strrev only for Unicode might be a viable solution. If the image is "right" and the INPUT box is "wrong" you can do HTML attributes for rtl versus ltr, I think. Not that I really have any clue what I'm talking about here... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#243299) next »