SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class utf8

A port of phputf8 to a unified file/class. Checks PHP status to ensure that
UTF-8 support is available and normalize global variables to UTF-8. It also
provides multi-byte aware replacement string functions.

This file is licensed differently from the rest of Kohana. As a port of
phputf8, which is LGPL software, this file is released under the LGPL.

PCRE needs to be compiled with UTF-8 support (--enable-utf8).
Support for Unicode properties is highly recommended (--enable-unicode-properties).

Authors

Functions

NameVisibilityDescription
cleanpublic (static)Recursively cleans arrays, objects, and strings. Removes ASCII control
isAsciipublic (static)Tests whether a string contains only 7bit ASCII bytes. This is used to
stripAsciiCtrlpublic (static)Strips out device control codes in the ASCII range.
stripNonAsciipublic (static)Strips out all non-7bit ASCII bytes.

public clean

object|array|string utf8::clean ( string|array|object $str );

Recursively cleans arrays, objects, and strings. Removes ASCII control
codes and converts to UTF-8 while silently discarding incompatible
UTF-8 characters.

public isAscii

bool utf8::isAscii ( string $str );

Tests whether a string contains only 7bit ASCII bytes. This is used to
determine when to use native functions or UTF-8 functions.

public stripAsciiCtrl

string utf8::stripAsciiCtrl ( string $str );

Strips out device control codes in the ASCII range.

public stripNonAscii

string utf8::stripNonAscii ( string $str );

Strips out all non-7bit ASCII bytes.

See also