php convert special characters to normal

Solutions on MaxInterview for php convert special characters to normal by the best coders in the world

showing results for - "php convert special characters to normal"
Julian
26 Oct 2019
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?>
Lenny
28 Aug 2016
1$str = "d&#039;&eacute;tudes"; //string with special characters
2$normal_str = html_entity_decode($str, ENT_QUOTES);  //d'études(studies in english)
3
Santiago
27 Feb 2016
1iconv('utf-8', 'ascii//TRANSLIT', $text);
2