|
UConverter::transcodeConvert a string from one character encoding to another Description
public static stringfalse UConverter::transcode(
string $str ,string $toEncoding ,string $fromEncoding ,arraynull $options = null )
Converts Parameters
Return Values
Returns the converted string or ExamplesExample #1 Converting from UTF-8 to UTF-16 and back
The above example will output: 005a006f00eb 5a6fc3ab Example #2 Invalid characters in input
If the input string contains a sequence of bytes which is not valid in
the encoding specified by
The above example will output: fffd Example #3 Characters which cannot be encoded
If the input string contains characters which cannot be represented
in
The above example will output: 1a 3f 3f See Also
|