Re: utf-8 in $_POST
| From: | pobox@verysmall.org | Date: | Mon, 07 Jan 2008 15:56:13 +0000 |
| Subject: | Re: utf-8 in $_POST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266842@lists.php.net to get a copy of this message | ||
Olav Mørkrid wrote:
hello does php have any built-in functions to convert post data from whatever format it arrives in to whatever format i wish? example: i use iso-8859-1 internally, and even specify accept-charset=iso-8859-1 in my html, but some browsers (phones) send utf-8 anyway. do i have to manually check if CONTENT_TYPE says "utf-8" and then convert the $_POST array elements one by one, or does php have any built-in functions to ease this?That's interesting question. Do you generate the pages, respectively do you specify something like this - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> My experience is that this does not affect only the displayed characters, but the way the form fields are transported. But perhaps I am wrong, Iv