1<?php
2/* Convert internal character encoding to SJIS */
3$str = mb_convert_encoding($str, "SJIS");
4
5/* Convert EUC-JP to UTF-7 */
6$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");
7
8/* Auto detect encoding from JIS, eucjp-win, sjis-win, then convert str to UCS-2LE */
9$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");
10
11/* "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
12$str = mb_convert_encoding($str, "EUC-JP", "auto");
13?>
1$str = "d'études"; //string with special characters
2$normal_str = html_entity_decode($str, ENT_QUOTES); //d'études(studies in english)
3