Re: languages and PHP

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

 



David Christopher Zentgraf wrote:

> Your biggest problem will be if you accept any kind of user input
> which could be in any kind of language.
> Depending on your server configuration you'll probably have some
> serious cleaning and filtering to do.
> I often have to employ this line for example:
> foreach (array_keys($_POST) as $key) $clean[$key] =
> mb_convert_encoding($_POST[$key], "UTF-8");
> 
> Trying to make sure that you'll receive UTF-8 helps as well:
> <form action="form.php" method="post" enctype="multipart/form-data"
> accept-charset="utf-8">

I work almost exclusively in UTF-8 (language irrelevant), but I've never
had to do any of the above.  The mb_convert_encoding() from UTF-8 to
UTF-8 doesn't seem to make much sense? 


/Per Jessen, Zürich

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