Convert encoding to UTF-8 from ISO-8859-1 / Windows-1252 with PHP

Convert "Western European" encoding to UTF-8 (from ISO-8859-1 / Windows-1252):

$my_detect_encoding = mb_detect_encoding($content, mb_detect_order(), false);
    
if( $my_detect_encoding != 'UTF-8'){
	$content= iconv('ISO-8859-1', 'UTF-8//TRANSLIT//IGNORE', $content);
}

 

 

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare