Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Processing accented characters submitted from forms Date: Thu, 02 Jan 2014 18:15:50 +0100 Lines: 35 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net vxwKGdtC0NRkH5XY1OLEsQBVC5FKasd99AMhArFwteDUq0xLk9 Cancel-Lock: sha1:VW30rV4SIHljdtcSIhu7d+dSqNo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: Xref: csiph.com comp.lang.php:12503 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