summaryrefslogtreecommitdiff
path: root/program/lib/utf8.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/lib/utf8.inc')
-rw-r--r--program/lib/utf8.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/lib/utf8.inc b/program/lib/utf8.inc
index 72a96b4e9..43ecb328b 100644
--- a/program/lib/utf8.inc
+++ b/program/lib/utf8.inc
@@ -88,7 +88,9 @@ function utf8ToUnicodeEntities ($source) {
$thisPos++;
}
- if ($thisLen == 1)
+ if ($decimalCode<128)
+ $encodedLetter = chr($decimalCode);
+ else if ($thisLen == 1)
$encodedLetter = "&#". str_pad($decimalCode, 3, "0", STR_PAD_LEFT) . ';';
else
$encodedLetter = "&#". str_pad($decimalCode, 5, "0", STR_PAD_LEFT) . ';';