diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-21 12:12:23 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-21 12:12:23 +0000 |
| commit | a859a759e8ca812a55ac36aba2e36446c17574e0 (patch) | |
| tree | 4b91e5aa1cd01d69facdc1194137ac46666c3d0a /roundcubemail/program/lib/utf8.inc | |
| parent | e8ee29555cd7845b3fbfcaab6f012608f80ad442 (diff) | |
Improved support for UTF-8 and other charsets
git-svn-id: https://svn.roundcube.net/trunk@50 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib/utf8.inc')
| -rw-r--r-- | roundcubemail/program/lib/utf8.inc | 4 |
1 files changed, 3 insertions, 1 deletions
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) . ';'; |
