From a859a759e8ca812a55ac36aba2e36446c17574e0 Mon Sep 17 00:00:00 2001 From: roundcube Date: Fri, 21 Oct 2005 12:12:23 +0000 Subject: Improved support for UTF-8 and other charsets git-svn-id: https://svn.roundcube.net/trunk@50 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/lib/utf8.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'roundcubemail/program/lib/utf8.inc') diff --git a/roundcubemail/program/lib/utf8.inc b/roundcubemail/program/lib/utf8.inc index 72a96b4e9..43ecb328b 100644 --- a/roundcubemail/program/lib/utf8.inc +++ b/roundcubemail/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) . ';'; -- cgit v1.2.3