hello, i have php function get text contents from txt files in my server and display it into browser some times when i display that content i get non reading charset and i using iconv first to convert it from iso to utf-8 i need to define fires the charset of the text if it utf-8 display it if not convert it using iconv and display it how can i defined the charset stored in variable ?
it work also when data in utf-8 encoding so it convert it to non reading when data is utf8 and working fine when it iso
not work with windows-1256 when i test this mb_check_encoding($con, 'windows-1256') or mb_check_encoding($con, 'cp1256') i get php error Warning: mb_check_encoding() [function.mb-check-encoding]: Invalid encoding "windows-1256" in **** on line 75 Warning: mb_check_encoding() [function.mb-check-encoding]: Invalid encoding "cp1256" in **** on line 75