MartinHowe Posted July 27, 2010 Share Posted July 27, 2010 Please does anybody have a workaround or suggestions for a script that is expecting UTF-8 everywhere but does not get it because PHP (or something else lower under the hood) seems to ignore the headers? The http headers and content type headers emitted all state utf-8 for the charset, application/x-www-form-urlencoded, etc. On my development server (XAMPP 1.7.3, PHP 5.3.1, Apache 2.2.14, Windows 7) it works fine; pasting a unicode character from Windows 0x0100 (Ā) gets sent in the http header as %C4%80 and is passed through as 0xC480, no problem. However, on the production server (rented so I have no control over the software versions, PHP 5.2.13, Apache 2.2.15, CentOS), the %C4%80 in the header is translated into a question mark (0x3F) directly; i.e.: echo(bin2hex($_POST['field-name'])) returns '3f'. I can't find any reference to this via google or even here, but perhaps am using the "wrong" search terms. Does anybody know a work-around for this or am I doing something stupefyingly, well, stupid Link to comment https://forums.phpfreaks.com/topic/208992-umangling-utf-8-post-data-eg-c480-becoming-0x3f/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.