utf 8 - How to handle unicode issues in PHP? -
how handle unicode issues in php. set utf-8 parameter function needs or set locale somewhere in bootstrap file once? how affect mysql etc
there's no way set global encoding in php. best can is, use mb_
family of functions, , try explicit encoding want use.
as mysql, in particular, can make sure connects using utf-8, calling set encoding method/function right after connecting or in constructor if you're using pdo (see http://ar.php.net/manual/en/pdo.construct.php.)
using utf-8 php requires discipline, but, it's definitly worth it. hope of helps.
Comments
Post a Comment