UTF8 routines
version | 1 |
---|---|
package | wikindx4\core\display |
author | Mark Grimshaw |
__construct()
decodeUtf8(string $utf8_string) : string
Freely borrowed from morris_hirsch at http://www.php.net/manual/en/function.utf8-decode.php bytes bits representation 1 7 0bbbbbbb 2 11 110bbbbb 10bbbbbb 3 16 1110bbbb 10bbbbbb 10bbbbbb 4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb Each b represents a bit that can be used to store character data. input CANNOT have single byte upper half extended ascii codes
string
string
decode_if_utf8(string $string) : string
string
string
detectUtf8(string $string) : boolean
string
boolean
encodeUtf8(string $str) : string
string
string
smartUtf8_decode(string $inStr) : string
Adapted from 'nospam' in the user contributions at: http://www.php.net/manual/en/function.utf8-decode.php
string
string
smartUtf8_encode(string $str) : boolean: string
version | 1 Tools for validing a UTF-8 string is well formed. The Original Code is Mozilla Communicator client code. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. All Rights Reserved. Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi) Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com) |
---|---|
see | \http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp |
see | \http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp |
see | Tests a string as to whether it's valid UTF-8 and supported by the Unicode standard Note: this function has been modified to simple return true or false |
author | hsivonen@iki.fi |
see | \http://hsivonen.iki.fi/php-utf8/ |
see | \utf8_compliant |
string
UTF-8 encoded string
boolean
true if validstring
testFormInput(string $input) : string
$this->vars['utf8CharTest'] is a hidden field wikindx automatically adds to all forms and contains the characters 'ä™®'
See http://dev.mysql.com/tech-resources/articles/4.1/unicode.html
string
string
utf8_chr(string $code) : string
string
string
utf8_htmlspecialchars(string $str) : string
string
string
utf8_strlen(string $string) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \strlen() |
string
string
utf8_strtolower(string $string) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \strtolower() |
see | \utf8_strtoupper() |
string
string
utf8_strtoupper(string $string) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \strtoupper() |
see | \utf8_strtoupper() |
string
string
utf8_substr(string $str, int $start, int $length) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \substr() |
string
int
int
Default is NULL
string
utf8_ucfirst(string $str) : string
code2utf8(int $num) : string
int
string
loadVars()
This lookuptable defines the upper case letters to their corresponding lower case letter in UTF-8
author | Andreas Gohr |
---|
unicode_to_utf8(string $str) : string
author | Scott Michael Reynen |
---|---|
link | http://www.randomchaos.com/document.php?source=php_and_unicode |
see | \utf8_to_unicode() |
string
string
utf8_to_unicode(string $str) : string
author | Scott Michael Reynen |
---|---|
link | http://www.randomchaos.com/document.php?source=php_and_unicode |
see | \unicode_to_utf8() |
string
string
$vars
UTF-8 routines
version | 1 |
---|---|
package | wikindx4\core\utf8 |
author | Mark Grimshaw |
__construct()
decodeUtf8(string $utf8_string) : string
Freely borrowed from morris_hirsch at http://www.php.net/manual/en/function.utf8-decode.php bytes bits representation 1 7 0bbbbbbb 2 11 110bbbbb 10bbbbbb 3 16 1110bbbb 10bbbbbb 10bbbbbb 4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb Each b represents a bit that can be used to store character data.
input CANNOT have single byte upper half extended ascii codes
string
string
encodeUtf8(string $str) : string
string
string
smartUtf8_decode(string $inStr) : string
Adapted from 'nospam' in the user contributions at: http://www.php.net/manual/en/function.utf8-decode.php
string
string
smartUtf8_encode(string $str) : boolean
version | 2 Tools for validing a UTF-8 string is well formed. The Original Code is Mozilla Communicator client code. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. All Rights Reserved. Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi) Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com) |
---|---|
see | \http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp |
see | \http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp |
see | Tests a string as to whether it's valid UTF-8 and supported by the Unicode standard |
author | hsivonen@iki.fi |
see | \http://hsivonen.iki.fi/php-utf8/ |
see | \utf8_compliant |
string
UTF-8 encoded string
boolean
true if validutf8_htmlspecialchars(string $str) : string
string
string
utf8_strlen(string $string) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \strlen() |
string
string
utf8_strtolower(string $string) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \strtolower() |
see | \utf8_strtoupper() |
string
string
utf8_strtoupper(string $string) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \strtoupper() |
see | \utf8_strtoupper() |
string
string
utf8_substr(string $str, int $start, int $length) : string
Uses mb_string extension if available
author | Andreas Gohr |
---|---|
see | \substr() |
string
int
int
Default is NULL
string
utf8_ucfirst(string $str) : string
code2utf8(int $num) : string
int
string
loadVars()
This lookuptable defines the upper case letters to their corresponding lower case letter in UTF-8
author | Andreas Gohr |
---|
unicode_to_utf8(string $str) : string
author | Scott Michael Reynen |
---|---|
link | http://www.randomchaos.com/document.php?source=php_and_unicode |
see | \utf8_to_unicode() |
string
string
utf8_to_unicode(string $str) : string
author | Scott Michael Reynen |
---|---|
link | http://www.randomchaos.com/document.php?source=php_and_unicode |
see | \unicode_to_utf8() |
string
string