[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/utf/ -> utf_normalizer.php (summary)

(no description)

Copyright: (c) 2005 phpBB Group
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 1516 lines (43 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

utf_normalizer:: (7 methods):
  cleanup()
  nfc()
  nfkc()
  nfd()
  nfkd()
  recompose()
  decompose()


Class: utf_normalizer  - X-Ref

Unicode normalization routines

cleanup(&$str)   X-Ref
Validate, cleanup and normalize a string

The ultimate convenience function! Clean up invalid UTF-8 sequences,
and convert to Normal Form C, canonical composition.

param: string    &$str    The dirty string
return: string            The same string, all shiny and cleaned-up

nfc(&$str)   X-Ref
Validate and normalize a UTF string to NFC

param: string    &$str    Unchecked UTF string
return: string            The string, validated and in normal form

nfkc(&$str)   X-Ref
Validate and normalize a UTF string to NFKC

param: string    &$str    Unchecked UTF string
return: string            The string, validated and in normal form

nfd(&$str)   X-Ref
Validate and normalize a UTF string to NFD

param: string    &$str    Unchecked UTF string
return: string            The string, validated and in normal form

nfkd(&$str)   X-Ref
Validate and normalize a UTF string to NFKD

param: string    &$str    Unchecked UTF string
return: string            The string, validated and in normal form

recompose($str, $pos, $len, &$qc, &$decomp_map)   X-Ref
Recompose a UTF string

param: string    $str            Unchecked UTF string
param: integer    $pos            Position of the first UTF char (in bytes)
param: integer    $len            Length of the string (in bytes)
param: array    &$qc            Quick-check array, passed by reference but never modified
param: array    &$decomp_map    Decomposition mapping, passed by reference but never modified
return: string                    The string, validated and recomposed

decompose($str, $pos, $len, &$decomp_map)   X-Ref
Decompose a UTF string

param: string    $str            UTF string
param: integer    $pos            Position of the first UTF char (in bytes)
param: integer    $len            Length of the string (in bytes)
param: array    &$decomp_map    Decomposition mapping, passed by reference but never modified
return: string                    The string, decomposed and sorted canonically



Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1