mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-05 00:04:00 +01:00
Tweak to if condition to not convert UTF8
Otherwise we are UTF8 encoding the UTF8 encoding and special chars can get messed up
This commit is contained in:
@@ -72,7 +72,7 @@ function toUTF8noBOM($string,$message) {
|
||||
$teststringBroken = utf8_decode($teststring);
|
||||
$teststringConverted = iconv("UTF-8", "UTF-8//IGNORE", $teststringBroken);
|
||||
// If we have a matching length, UTF8 encode it
|
||||
if ($encType != "ASCII" && strlen($teststringConverted) == strlen($teststringBroken)) {
|
||||
if ($encType != "ASCII" && $encType != "UTF-8" && strlen($teststringConverted) == strlen($teststringBroken)) {
|
||||
$string = utf8_encode($string);
|
||||
if ($message) {
|
||||
echo "top.ICEcoder.message('Your document doesn\'t appear to be in UTF-8 encoding so has been converted.');";
|
||||
|
||||
Reference in New Issue
Block a user