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

Home » Imported messages » comp.lang.php » How do I force PHP to assume UTF-8 for $_GET?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How do I force PHP to assume UTF-8 for $_GET? [message #174425 is a reply to message #174422] Sat, 11 June 2011 03:28 Go to previous messageGo to previous message
legalize+jeeves is currently offline  legalize+jeeves
Messages: 21
Registered: September 2010
Karma:
Junior Member
[Please do not mail me a copy of your followup]

Tim Streater <timstreater(at)waitrose(dot)com> spake the secret code
<timstreater-3C1F83(dot)23282710062011(at)news(dot)individual(dot)net> thusly:

> In article <95fidnFk6U1(at)mid(dot)individual(dot)net>,
> Martin Kotulla <mk999(at)gmx(dot)de> wrote:
>
>> 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.
>
> This may not be PHP's fault. Re-reading your first post I see that your
> win-app does not indicate UTF-8 in the HTTP headers. That may mean that
> the byte stream is wrong before PHP even sees it. But I'm just guessing.

You can test that idea by running Fiddler2 on the machine where the
Windows application is running. You should be able to see the entire
byte stream between application and remote server.
<http://www.fiddler2.com/fiddler2/>
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ldap_modify
Next Topic: Displaying UTF-8-encoded strings from MySQL with PHP
Goto Forum:
  

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

Current Time: Tue Nov 26 06:55:38 GMT 2024

Total time taken to generate the page: 0.03912 seconds