I need to create an application in PHP that can handle all Unicode characters in all places — edit fields, static HTML, database. Can somebody tell me the complete list of a
Apache
The server encoding must be either not set, or set to UTF-8. This is done via the apache AddDefaultCharset directive. This can go to the virtualhost or the general file (see documentation).
AddDefaultCharset utf-8
MySql
SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'
PHP
1- You should set the HTML charset of the page to be UTF-8, via a meta tag on the page, or via a PHP header:
-or-
header('Content-type: text/html; charset=utf-8');
2- You should always use the mb* version of string-related functions, for example, mbstrlen instead of strlen to get the string length of a string.
This should allow you to have UTF-8 everywhere, from the pages to the data. A test you can do: right-click anywhere on the page using firefox, and select Show page information. The effective encoding is listed in that page.