summaryrefslogtreecommitdiff
path: root/program/lib/utf8.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2005-10-21 12:12:23 +0000
committerthomascube <thomas@roundcube.net>2005-10-21 12:12:23 +0000
commita95e0e174c48b7c5242b8969aef99838a52c41ee (patch)
treeeb87cb9c33433269d2f2376e841e1d6d66eff667 /program/lib/utf8.inc
parent7902df457d3401c83f78a6ddd48df1a7f07f68b1 (diff)
Improved support for UTF-8 and other charsets
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) . ';';