Extracted from Pike v7.3 release 45 at 2002-06-04.
pike.roxen.com
[Top]

Method string_to_utf8()


Method string_to_utf8

string string_to_utf8(string s)
string string_to_utf8(string s, int extended)

Description

Converts a string into an UTF8 compliant byte-stream.

Note

Throws an error if characters not valid in an UTF8 stream are encountered. Valid characters are in the range 0x00000000 - 0x7fffffff.

If extended is 1, characters in the range 0x80000000-0xfffffffff will also be accepted, and encoded using a non-standard UTF8 extension.

See also

Locale.Charset.encoder, string_to_unicode, unicode_to_string, utf8_to_string