Method utf8_to_string()

Method utf8_to_string

string utf8_to_string(string(8bit) s)
string utf8_to_string(string(8bit) s, int extended)


Converts an UTF-8 byte-stream into a string.


Throws an error if the stream is not a legal UTF-8 byte-stream.

Accepts and decodes the extension used by string_to_utf8() if extended is 1.


In conformance with RFC 3629 and Unicode 3.1 and later, non-shortest forms are not decoded. An error is thrown instead.

See also

Locale.Charset.encoder(), string_to_unicode(), string_to_utf8(), unicode_to_string()