Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Wildcard Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Unicode Source Code
 previous   up   next 

Function Summary
string
utf8ToStri (in string: utf8)
Convert a string with bytes in UTF-8 encoding to UTF-32.
string
striToUtf8 (in string: stri)
Convert a string to an UTF-8 encoded string of bytes.
string
utf16beToStri (in string: utf16be)
Convert a string with bytes in UTF-16BE encoding to UTF-32.
string
striToUtf16be (in string: stri)
Convert a string to an UTF-16BE encoded string of bytes.
string
utf16leToStri (in string: utf16le)
Convert a string with bytes in UTF-16LE encoding to UTF-32.
string
striToUtf16le (in string: stri)
Convert a string to an UTF-16LE encoded string of bytes.
string
replaceUtf16SurrogatePairs (in string: stri)
Return string where all surrogate pairs are replaced by single chars.
string
utf7ToStri (in string: stri7)
Convert a string from an UTF-7 encoding to UTF-32.

Function Detail

utf8ToStri

const func string: utf8ToStri (in string: utf8)

Convert a string with bytes in UTF-8 encoding to UTF-32.

Parameters:
utf8 - String of bytes encoded with UTF-8.
Returns:
utf8 converted to a normal (UTF-32) string.
Raises:
RANGE_ERROR - When utf8 contains a char beyond '\255;' or when utf8 is not encoded with UTF-8.

striToUtf8

const func string: striToUtf8 (in string: stri)

Convert a string to an UTF-8 encoded string of bytes.

Parameters:
stri - Normal (UTF-32) string to be converted to UTF-8.
Returns:
stri converted to a string of bytes with UTF-8 encoding.

utf16beToStri

const func string: utf16beToStri (in string: utf16be)

Convert a string with bytes in UTF-16BE encoding to UTF-32.

Parameters:
utf16be - String of bytes encoded with UTF-16 in big endian byte order.
Returns:
utf16be converted to a normal (UTF-32) string.
Raises:
RANGE_ERROR - When the length of utf16be is odd or when utf16be contains a char beyond '\255;' or when an illegal surrogate pair is found.

striToUtf16be

const func string: striToUtf16be (in string: stri)

Convert a string to an UTF-16BE encoded string of bytes.

Parameters:
stri - Normal (UTF-32) string to be converted to UTF-16BE.
Returns:
stri converted to a string of bytes with UTF-16BE encoding.
Raises:
RANGE_ERROR - When a character is not representable as UTF-16 or the first char of a surrogate pair is found.

utf16leToStri

const func string: utf16leToStri (in string: utf16le)

Convert a string with bytes in UTF-16LE encoding to UTF-32.

Parameters:
utf16le - String of bytes encoded with UTF-16 in little endian byte order.
Returns:
utf16le converted to a normal (UTF-32) string.
Raises:
RANGE_ERROR - When the length of utf16le is odd or when utf16le contains a char beyond '\255;' or when an illegal surrogate pair is found.

striToUtf16le

const func string: striToUtf16le (in string: stri)

Convert a string to an UTF-16LE encoded string of bytes.

Parameters:
stri - Normal (UTF-32) string to be converted to UTF-16LE.
Returns:
stri converted to a string of bytes with UTF-16LE encoding.
Raises:
RANGE_ERROR - When a character is not representable as UTF-16 or the first char of a surrogate pair is found.

replaceUtf16SurrogatePairs

const func string: replaceUtf16SurrogatePairs (in string: stri)

Return string where all surrogate pairs are replaced by single chars.

Parameters:
stri - String of UTF-16 or UTF-32 Unicode characters, which may contain surrogate pairs.
Returns:
stri with all surrogate pairs replaced by single UTF-32 chars.
Raises:
RANGE_ERROR - If an illegal surrogate pair is found.

utf7ToStri

const func string: utf7ToStri (in string: stri7)

Convert a string from an UTF-7 encoding to UTF-32.

Parameters:
stri7 - String of bytes encoded with UTF-7.
Returns:
stri7 converted a to normal (UTF-32) string.
Raises:
RANGE_ERROR - The string is not UTF-7 encoded.


 previous   up   next