0x10FFFF)) { trigger_error('UTF8::to_unicode: Illegal sequence or codepoint in UTF-8 at byte '.$i, E_USER_WARNING); return FALSE; } if (0xFEFF != $m_ucs4) { // BOM is legal but we don't want to output it $out[] = $m_ucs4; } // Initialize UTF-8 cache $m_state = 0; $m_ucs4 = 0; $m_bytes = 1; } } else { // ((0xC0 & (*in) != 0x80) AND (m_state != 0)) // Incomplete multi-octet sequence trigger_error('UTF8::to_unicode: Incomplete multi-octet sequence in UTF-8 at byte '.$i, E_USER_WARNING); return FALSE; } } } return $out; }