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 #174422 is a reply to message #174421] Fri, 10 June 2011 22:28 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
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 may want to subscribe to the PHP General mailing list and ask your
question there. Send a mail to:

<php-general-subscribe(at)lists(dot)php(dot)net>

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[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: Sun Nov 24 15:56:06 GMT 2024

Total time taken to generate the page: 0.05365 seconds