Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #2087
| From | Martin Kotulla <mk999@gmx.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: How do I force PHP to assume UTF-8 for $_GET? |
| Date | 2011-06-10 23:59 +0200 |
| Message-ID | <95fidnFk6U1@mid.individual.net> (permalink) |
| References | <95f6abF3qjU1@mid.individual.net> <timstreater-5EBE80.19545510062011@news.individual.net> <95f7trFehmU1@mid.individual.net> <timstreater-6699FF.21564610062011@news.individual.net> |
On 10.06.2011 22:56, Tim Streater wrote: > > OK, maybe I was asking the wrong question. What do you mean by "access" > in "When I now access the parameters via $_GET in my PHP script, ..."? > Have you checked that when the Win-app sends U+3563 you get three bytes > of data (0xE3, 0x95, 0xA3) in your PHP script? What are you then > intending to do with those Chinese characters? > The Windows app sends three UTF-8 encoded characters. The PHP $_GET array only returns two, one being dropped by PHP because it considers out-of-range characters (in its ISO-8859-1 mind) incorrect. My script needs to accept arbitrary UTF-8 sequences but PHP drops these characters because it (correctly, in its ISO-8859-1 mind) thinks they are invalid. But in the UTF-8 system, they are valid. I need a way to tell PHP that the sequence is UTF-8 before I access it. As soon as my script reads something that PHP considers ISO-8859-1, the damage is done. iconv back to UTF-8 won't help me, I cannot unscramble scrambled eggs. -mk
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do I force PHP to assume UTF-8 for $_GET? Martin Kotulla <mk999@gmx.de> - 2011-06-10 20:32 +0200
Re: How do I force PHP to assume UTF-8 for $_GET? Tim Streater <timstreater@waitrose.com> - 2011-06-10 19:54 +0100
Re: How do I force PHP to assume UTF-8 for $_GET? Martin Kotulla <mk999@gmx.de> - 2011-06-10 21:00 +0200
Re: How do I force PHP to assume UTF-8 for $_GET? Tim Streater <timstreater@waitrose.com> - 2011-06-10 21:56 +0100
Re: How do I force PHP to assume UTF-8 for $_GET? Martin Kotulla <mk999@gmx.de> - 2011-06-10 23:59 +0200
Re: How do I force PHP to assume UTF-8 for $_GET? Tim Streater <timstreater@waitrose.com> - 2011-06-10 23:28 +0100
Re: How do I force PHP to assume UTF-8 for $_GET? legalize+jeeves@mail.xmission.com (Richard) - 2011-06-11 03:28 +0000
Re: How do I force PHP to assume UTF-8 for $_GET? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-10 19:20 -0400
Re: How do I force PHP to assume UTF-8 for $_GET? Martin Kotulla <mk999@gmx.de> - 2011-06-17 09:27 +0200
csiph-web