From ac65cd89c1a1fbaf47c0837c6e254adddf337499 Mon Sep 17 00:00:00 2001 From: bhz6344 Date: Mon, 17 Aug 2015 14:23:45 +0800 Subject: [PATCH] To fix Chinese character display abnormal When "default_charset" was not set in php.ini,and the file contents chinese char,it may show incorrectly. Because the function htmlentities() takes "ISO-8859-1" as default value of "default_charset" if PHP version is lower than 5.4. So I think it's better to check the "default_charset" before function htmlentities(). What's your opinion? --- lib/file-control.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/file-control.php b/lib/file-control.php index 18df5db..32f1784 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -103,7 +103,10 @@ if ($_GET['action']=="load") { } else { $loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true); } - echo ' \ No newline at end of file +