FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Processing accented characters submitted from forms
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Processing accented characters submitted from forms [message #184471 is a reply to message #184469] Thu, 02 January 2014 17:15 Go to previous messageGo to previous message
J.O. Aho is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ORMs comparisons/complaints.
Next Topic: thank you, richard@noreply
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 22:00:29 GMT 2024

Total time taken to generate the page: 0.23917 seconds