UTF8Utils
class UTF8Utils
UTF-8 Utilities
Constants
FFFD |
The Unicode replacement character. . |
Methods
static
countChars($string)
Count the number of characters in a string.
static
convertToUTF8(
string $data,
string $encoding = 'UTF-8')
Convert data from the given encoding to UTF-8.
static
array
checkForIllegalCodepoints(
string $data)
Checks for Unicode code points that are not valid in a document.
Details
at line line 48
static
countChars($string)
Count the number of characters in a string.
UTF-8 aware. This will try (in order) iconv, MB, libxml, and finally a custom counter.
at line line 77
static
convertToUTF8(
string $data,
string $encoding = 'UTF-8')
Convert data from the given encoding to UTF-8.
This has not yet been tested with charactersets other than UTF-8. It should work with ISO-8859-1/-13 and standard Latin Win charsets.
at line line 131
static
array
checkForIllegalCodepoints(
string $data)
Checks for Unicode code points that are not valid in a document.