& Nbsp; previously said that if the JS file is not UTF8 will have bugs in IE, so JS code should also use UTF-8. There are also databases to use UTF-8. Php (as the mainstream development language) with UTF-8 Summary: php (as the mainstream development language) file itself must be UTF-8 encoding. Unlike Java, clas is generated
Previously said that if the JS file is not UTF8 will have bugs in IE, so JS code also use UTF-8. There are also databases to use UTF-8.
Php (as the mainstream development language) with UTF-8 summary:
- Php (as the mainstream development language) files must be UTF-8 encoding. Unlike Java, class files are generated to avoid this problem.
- Php (as the current mainstream development language) to the output header: header ("Content-Type: text/html; charset = UTF-8 ″)
- Meta tags do not matter. all browsers with headers will parse them by header.
- UTF8 is required for all peripherals, including databases, *. js, and *. css (CSS has little impact)
- Php (as the mainstream development language) is not Unicode, and all functions such as substr must be changed to mb_substr (mbstring extension is required ); or use iconv transcoding (basically linux is installed. if it is not installed, download, tar, make, and make install are very simple)
- My. ini:
[MySQL (best combination with PHP)]
Default-character-set = utf8
[MySQL (the best combination with PHP) d]
Default-character-set = utf8
Default-storage-engine = MyISAM
Add the following to [MySQL (the best combination with PHP) d:
Default-collation = utf8_bin
Init_connect = set names utf8
- Add
Mb_internal_encoding (UTF-8 );
- Add ENGINE = MyISAM default charset = utf8 COLLATE = utf8_bin to the last side of create table.
- Php (as the mainstream development language) MyAdmin/config. inc. php (as the mainstream development language)
$ Cfg [DefaultCharset] = UTF-8;
$ Cfg [RecodingEngine] = iconv;
- When exporting data in php (as the mainstream development language) Admin
Remove the "Display in hexadecimal format in binary ".
Particularly depressing: file system functions do not support UTF-8!