Re: utf-8 in $_POST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> <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

This works for me as well.

Put in utf-8 and you should be good to go.

You don't -technically- need to even change your database fields or
anything; MySQL will take the utf-8 content and treat it like normal
binary content.

(However, if you want to modify the data in MySQL, then you might want
to make sure you have all the right character sets and stuff...)

I've had 100% success with just inserting and selecting info back and
forth from MySQL and displaying it on the page, with the proper <meta>
tag. Works like a charm in all languages attempted - English, Chinese
(both Simplified and Traditional), Russian, etc... it will look funky
if you view it directly in MySQL command line client or if you forget
the utf-8 tag though (unless your TERM + column and connection is set
properly)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux