Jump to content

UTF-8


asmith

Recommended Posts

hey guys

 

i'm trying to create some captcha-type image with arabic letters.

 

i can't save the file as unicode, cause php do nothing about it (only a white page) .

when i save as utf-8 , php do not show images , it shows :

 

挑`?꜓3Ji 1Դښqii(?RbҒRҩ?????--%-"д JZE!ii)i????E?JZ BҒR?E!h )?????R???R- J)??()-%-"д????BҊAE"СE ??R????hZQIE"?RZJ`? !?C JZJ bRRғ!?i -%2X??(?C???? JJZJd? ?Hh%?%-%2???? ...

 

more than half of page about that.

 

using utf-8 make html pages able to read arabic letters right, but won't work for php.

 

any idea?

 

thanks a lot

Link to comment
https://forums.phpfreaks.com/topic/107162-utf-8/
Share on other sites

It would help if showed us some of the code that illustrates where the problem lies. Possibly this can be sorted with utf8_encode/utf8_decode or mbstring extension. It is also important to know what the source of the string is.

 

Possibly your problem could simply be solved by doing something like:

 

imagettftext($captha, 20, 0, 10, 20, $black, $font, utf8_encode($text));

 

If not, you have to provide a little more info.

Link to comment
https://forums.phpfreaks.com/topic/107162-utf-8/#findComment-549721
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.