You are here: Re: UTF-8 file reading and writing for PHP « PHP Programming Language « IT news, forums, messages
Re: UTF-8 file reading and writing for PHP

Posted by Bent Stigsen on 11/11/88 11:49

HaggMan wrote:
> Thanks for the reply...
>
> My goal is to allow user input in UTF-8, in Arabic script, for example.
> I then save what they input to a file. Then I'd like to retrieve and
> print out the original stuff that they wrote.
>
> I've tried various variations of utf8_encode() and utf8_decode() and
> even without them, and every time, the resulting stuff is just ????? or
> other weird characters.
[snip]

If what you get sent is in UTF-8 and the page you send out is in
UTF-8, then you don't need to do anything.

Make sure what you get really is UTF-8 (e.g.
"mb_detect_encoding($thetext)" )

Also make sure the browser is told it is UTF-8. (check headers,
metatags, xml-declaration)


/Bent

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация