File/decode/eastasia/iso_2022_support.php

Description

iso-2022-xx support functions

****************************************************************************** Copyright (c) 2004-2005 The SquirrelMail Project Team Copyright (c) 2008 The NaSMail Project This file is part of NaSMail Extra Decoding library.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ****************************************************************************** Documents: RFC1468 iso-2022-jp (http://www.faqs.org/rfcs/rfc1468.html) RFC2237 iso-2022-jp-1 (http://www.faqs.org/rfcs/rfc2237.html) RFC1554 iso-2022-jp-2 (http://www.faqs.org/rfcs/rfc1554.html) RFC1557 iso-2022-kr (http://www.faqs.org/rfcs/rfc1557.html) RFC1922 iso-2022-cn (http://www.faqs.org/rfcs/rfc1922.html) iso-2022-cn-ext

Mappings: ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0201.TXT ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0208.TXT ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0212.TXT ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/KSC5601.TXT ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/GB/GB2312.TXT ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT

This script contains several mapping tables published by Unicode consorcium ****************************************************************************** Original Unicode, Inc copyright statement: ****************************************************************************** This file is provided as-is by Unicode, Inc. (The Unicode Consortium). No claims are made as to fitness for any particular purpose. No warranties of any kind are expressed or implied. The recipient agrees to determine applicability of information provided. If this file has been provided on optical media by Unicode, Inc., the sole remedy for any claim will be exchange of defective media within 90 days of receipt.

Unicode, Inc. hereby grants the right to freely use the information supplied in this file in the creation of products supporting the Unicode Standard, and to make copies of this file in any form for internal or external distribution as long as this notice remains ******************************************************************************

  • version: $Id: iso_2022_support.php 1286 2008-04-17 19:09:46Z tokul $
  • license: GNU Public License
Functions
get_iso_2022_symbol (line 83)

Converts iso2022 symbol to html entity.

ascii and jis0208-1983 mappings are supported since 1.0 jis0208-1978 and jis0201-1976 mappings are supported since 1.3

string get_iso_2022_symbol (string $string, integer $index, string $enc_table)
  • string $string: Full string
  • integer $index: Starting position
  • string $enc_table: Used encoding table
get_iso_2022_symbolsize (line 127)

Gets size of iso-2022 symbol in bytes

Defaults to one byte on unknown/unsupported encoding tables. ascii and jis0208-1983 mappings are supported since 1.0 jis0208-1978 and jis0201-1976 mappings are supported since 1.3

  • return: number of bytes used by characters in given encoding table
integer get_iso_2022_symbolsize (string $enc_table)
  • string $enc_table: iso-2022 encoding table

Documentation generated on Sun, 22 Nov 2009 17:36:40 +0200 by phpDocumentor 1.4.3