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 #174418 is a reply to message #174417] Fri, 10 June 2011 19:00 Go to previous messageGo to previous message
Martin Kotulla is currently offline  Martin Kotulla
Messages: 4
Registered: June 2011
Karma:
Junior Member
On 10.06.2011 20:54, Tim Streater wrote:
>
> How do you know it's dropped anything? IIRC PHP knows nothing about
> character sets, just bytes. Have you tried something like the following:
>
> $mystr = $_GET["mystr"];
> $utfstr = iconv ("iso-8859-1", "UTF-8//IGNORE", $mystr);
>

I tried that before. But in the example that I gave, the three UTF-8
bytes came out as two ISO-8859-1 characters. The 0x95 was dropped,
presumably because it's in the range 0x80 to 0x9F which is not defined
in ISO-8859-1.

-mk
[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:46:56 GMT 2024

Total time taken to generate the page: 0.03739 seconds