Jump to content

UTF-8


asmith
 Share

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
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
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.