Re: Sending different languages to GD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now, I think it is a text editor problem......

My text editor, BBedit, is set to utf8 encoding .
When I set encoding to utf-8, php outputs a blank screen...

If I set BBedit to Unix with Mac-Roman encoding, the php script executes but screws up the Polish language

Regardless, the php script looks fine within BBedit regardless of the text encode value...


If I use a  Simple/Free Text editor:
If I copy the BBedit text into a simple/free text editor, and then copy/paste this text to the original php script on the server...
everything renders properly....no problems at all

anyone know what this could be ?

g

On Sep 6, 2005, at 4:46 PM, Chris wrote:

Note: I haven't actually ever tried to put non-latin character s in an image, but I think this is the proper thing to do.

First of all, I believe imagettftext() accepts string in the UTF-8 encoding. SO, the first thing to try would be to convert to UTF-8l

mb_convert_encoding($text, 'UTF-8','iso-8859-2');

And, if that doesn't work. Ensure the font you're specifying can handle the characters you're giving it. (Arial Unicode would probably be a safe test font)

hope this helped.

Chris

Graham Anderson wrote:

How can I get Polish , iso-8859-2, text,  to output properly ?
PHP is reading the accent characters as blocks

I tried this, but it did not work...

// Set up text for a 'Polish' button
$text = "rozwiązania";
$text = mb_convert_encoding($text, "iso-8859-2","Auto");

//  Composit the text over a button image and output it
imagettftext($im, $fontSize, 0, 11, 16, $white, $font, $text);

Ultimately, I want to pass a $language variable to the script to get it to output to any number of supported languages
is there a simple function that does this ?

many thanks in advance :)
g


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux