Merge pull request #581 from bhz6344/patch-1

To fix Chinese character display abnormal
This commit is contained in:
Matt Pass
2015-08-21 06:06:54 +01:00

View File

@@ -99,7 +99,10 @@ if ($_GET['action']=="load") {
} else {
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
}
echo '</script><textarea name="loadedFile" id="loadedFile">'.htmlentities($loadedFile).'</textarea><script>';
$encoding=ini_get("default_charset");
if($encoding=="")
$encoding="UTF-8";
echo '</script><textarea name="loadedFile" id="loadedFile">'.htmlentities($loadedFile,ENT_COMPAT,$encoding).'</textarea><script>';
// Run our custom processes
include_once("../processes/on-file-load.php");
} else if (strpos($finfo,"image")===0) {
@@ -214,4 +217,4 @@ if (action=="load") {
// Finally, switch mode in case we have saved, renamed file etc
top.ICEcoder.switchMode();
</script>
</script>