Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php convert special characters to unicode

<?php
/* Convert internal character encoding to SJIS */
$str = mb_convert_encoding($str, "SJIS");

/* Convert EUC-JP to UTF-7 */
$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");

/* Auto detect encoding from JIS, eucjp-win, sjis-win, then convert str to UCS-2LE */
$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");

/* "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
$str = mb_convert_encoding($str, "EUC-JP", "auto");
?>
Comment

php convert special characters to normal

$str = "d&#039;&eacute;tudes"; //string with special characters
$normal_str = html_entity_decode($str, ENT_QUOTES);  //d'études(studies in english)
Comment

php convert special characters to normal

iconv('utf-8', 'ascii//TRANSLIT', $text);
Comment

PREVIOUS NEXT
Code Example
Php :: mysql count rows php 
Php :: print last sql query laravel 
Php :: laravel difference between current time and created time 
Php :: joomla login link 
Php :: Auth::routes(); why display error in route laravel 8 
Php :: laravel gigapay 
Php :: implode with br in php 
Php :: sha256 in php 
Php :: woocommerce get post terms product 
Php :: How to fix MySql: index column size too large (Laravel migrate) 
Php :: laravel faker title 
Php :: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) 
Php :: is users logged in laravel blade 
Php :: format date in laravel using carbon 
Php :: php check version ubuntu 
Php :: php convert minutes to hours and minutes 
Php :: php __construct 
Php :: php routing 
Php :: laravel make directory 
Php :: how to check if there is an authenticated user laravel 
Php :: fetch row in php 
Php :: factory laravel tinker 
Php :: laravel validate file type 
Php :: start server cmd php 
Php :: laravel 8 created at format 
Php :: magento 2 print php error 
Php :: Download multiple files as zip in PHP 
Php :: php convert to lowercase 
Php :: if is alphabet php 
Php :: setinterval php 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =