Re: Processing accented characters submitted from forms [message #184471 is a reply to message #184469] |
Thu, 02 January 2014 17:15 |
J.O. Aho
Messages: 194 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 02/01/14 16:55, JohnT wrote:
>
> One of the websites that I am working on is getting a lot of interest
> from countries that make a lot of use of accented characters.
>
> Usually accented characters come through fine.
>
> However, some are replaced by the character codes. e.g. İ
> This seems to be occurring for some Turkish and Romanian characters.
>
> Is PHP doing this ?
It's not doing it by magic, something in your code does it.
> ie: is it something I can fix with settings ?
You decode it, see
http://www.php.net/manual/en/function.htmlspecialchars-decode.php
You need to have a charset which supports all of the characters, like UTF-8.
> I need to send the data in non-html emails, so I need the original
> characters.
>
> html_entity_decode() doesn't seem to work for me.
>
> How do people usually handle this ?
You see to that everything is stored in UTF-8 from the beginning and do
not encode strings.
--
//Aho
|
|
|