Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #12503

Re: Processing accented characters submitted from forms

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: Processing accented characters submitted from forms
Date 2014-01-02 18:15 +0100
Message-ID <bill67F13f6U1@mid.individual.net> (permalink)
References <la4254$6bh$1@dont-email.me>

Show all headers | View raw


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. &#304;
> 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

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Processing accented characters submitted from forms JohnT <john-sospam@jtresponse.co.uk> - 2014-01-02 15:55 +0000
  Re: Processing accented characters submitted from forms "J.O. Aho" <user@example.net> - 2014-01-02 18:15 +0100
    Re: Processing accented characters submitted from forms JohnT <john-sospam@jtresponse.co.uk> - 2014-01-03 11:37 +0000
      Re: Processing accented characters submitted from forms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-03 12:37 +0000
        Re: Processing accented characters submitted from forms Tim Streater <timstreater@greenbee.net> - 2014-01-03 12:52 +0000
          Re: Processing accented characters submitted from forms JohnT <john-sospam@jtresponse.co.uk> - 2014-01-03 13:00 +0000
            Re: Processing accented characters submitted from forms Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-03 10:09 -0500
            Re: Processing accented characters submitted from forms "J.O. Aho" <user@example.net> - 2014-01-03 18:57 +0100
        Re: Processing accented characters submitted from forms JohnT <john-sospam@jtresponse.co.uk> - 2014-01-03 12:53 +0000
          Re: Processing accented characters submitted from forms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-03 14:30 +0000
            Re: Processing accented characters submitted from forms Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-03 10:11 -0500
              Re: Processing accented characters submitted from forms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-03 20:28 +0000
                Re: Processing accented characters submitted from forms Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-03 22:54 +0100
                Re: Processing accented characters submitted from forms Tim Streater <timstreater@greenbee.net> - 2014-01-03 21:58 +0000
                Re: Processing accented characters submitted from forms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-03 22:01 +0000
                Re: Processing accented characters submitted from forms Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-03 19:59 -0500
  Re: Processing accented characters submitted from forms Christoph Michael Becker <cmbecker69@arcor.de> - 2014-01-02 20:52 +0100
    Re: Processing accented characters submitted from forms JohnT <john-sospam@jtresponse.co.uk> - 2014-01-03 11:40 +0000
      Re: Processing accented characters submitted from forms Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-03 13:53 +0100
        Re: Processing accented characters submitted from forms JohnT <john-sospam@jtresponse.co.uk> - 2014-01-03 13:05 +0000
          Re: Processing accented characters submitted from forms Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-03 16:03 +0100
            Re: Processing accented characters submitted from forms Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-03 17:08 +0100

csiph-web