From 9b6663f87a7e679ffba691cf516191fc840cf978 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 24 Nov 2009 19:20:36 -0800 Subject: Update to Kohana r4684 which is now Kohana 2.4 and has substantial changes. --- system/core/utf8/from_unicode.php | 68 --------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 system/core/utf8/from_unicode.php (limited to 'system/core/utf8/from_unicode.php') diff --git a/system/core/utf8/from_unicode.php b/system/core/utf8/from_unicode.php deleted file mode 100644 index 66c6742d..00000000 --- a/system/core/utf8/from_unicode.php +++ /dev/null @@ -1,68 +0,0 @@ -= 0) AND ($arr[$k] <= 0x007f)) - { - echo chr($arr[$k]); - } - // 2 byte sequence - elseif ($arr[$k] <= 0x07ff) - { - echo chr(0xc0 | ($arr[$k] >> 6)); - echo chr(0x80 | ($arr[$k] & 0x003f)); - } - // Byte order mark (skip) - elseif ($arr[$k] == 0xFEFF) - { - // nop -- zap the BOM - } - // Test for illegal surrogates - elseif ($arr[$k] >= 0xD800 AND $arr[$k] <= 0xDFFF) - { - // Found a surrogate - trigger_error('utf8::from_unicode: Illegal surrogate at index: '.$k.', value: '.$arr[$k], E_USER_WARNING); - return FALSE; - } - // 3 byte sequence - elseif ($arr[$k] <= 0xffff) - { - echo chr(0xe0 | ($arr[$k] >> 12)); - echo chr(0x80 | (($arr[$k] >> 6) & 0x003f)); - echo chr(0x80 | ($arr[$k] & 0x003f)); - } - // 4 byte sequence - elseif ($arr[$k] <= 0x10ffff) - { - echo chr(0xf0 | ($arr[$k] >> 18)); - echo chr(0x80 | (($arr[$k] >> 12) & 0x3f)); - echo chr(0x80 | (($arr[$k] >> 6) & 0x3f)); - echo chr(0x80 | ($arr[$k] & 0x3f)); - } - // Out of range - else - { - trigger_error('utf8::from_unicode: Codepoint out of Unicode range at index: '.$k.', value: '.$arr[$k], E_USER_WARNING); - return FALSE; - } - } - - $result = ob_get_contents(); - ob_end_clean(); - return $result; -} -- cgit v1.2.3