- var_dump: documentation ( source)
- mb_detect_encoding: documentation ( source)
- json_encode: documentation ( source)
<?php
$some_string = "ннннн ннннн";
$arra_c = array("ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256");
foreach($arra_c as $k => $v){
var_dump(iconv("UTF-8", $v, $some_string));
}
var_dump(mb_detect_encoding($some_string));
var_dump(strlen(json_encode(array('message' => $some_string))));