I have a simple problem. I am using iconv to convert UTF-8 to LATIN 2 liek this
$res = file_put_contents($edi_path, iconv('utf-8', 'CP852', $html));
but the output file is win 1250 or by php detected as ISO and special characters are not interpreted correctly, so i tried to open it in PSPAD save as Latin 2, close it, and open again it works fine and everything looks good.
So problem is in my PHP code, any advice?