This
imagestring($this_img, 1, 4, 49, utf8_normalize_nfc($config['site_desc']), $color);
and this
imagestring($this_img, 1, 4, 49, utf8_clean_string($config['site_desc']), $color);
... have same result ...
I am actually confused ... Because if I am thinking about that - right characters are properly added to phpBB (probably with that functions) but aren´t shown in right way in php scripts ... So I think that functions are good, but not useful for those functions like imagestring() ... So I´ll have a look in php documentation ...
And I probably found that ...
http://cz2.php.net/manual/en/function.imagestring.php wrote:Piotr dot Sulecki at traxelektronik dot pl
09-Nov-2006 12:18
The built-in fonts used to be in latin-2 (iso8859-2) encoding. For some time, they are in latin-1 (iso8859-1) encoding. There is no way to change the encoding at all. If you need to use any other encoding, you have to use TrueType fonts.
... So I tried to check it if it´s true, so I make my own function ...
- Code: Select all
function toiso($text){
iconv('UTF-8', 'iso8859-2',$text);
return $text;
}
but it´s true, php don´t like it ... "Detected an illegal character in input string"

So it´s necessary to use imagettftext and font which knows right characters ... So ...
I added and used imagettftext instead of imagestring ...

- Code: Select all
$font = "framd.ttf";
imagettftext($this_img, 10, 0, 1, 50, $color, $font, $config['site_desc']);
... Result is visible in my signature








) Yea, there is no other way ... Than use true type fonts ... as I already wrote ...





