DecodeCharSet (open)
Convert a string from a specific character set to UNICODE(UTF-8)
Syntax
// Core function, no LOADLIB necessary
STRING FUNCTION DecodeCharSet(STRING text, STRING charset)
Parameters
STRING text
String to convert
STRING charset
Character set of the original string
Return value
STRING
The string converted to UNICODE(UTF-8), the proper encoding for HareScript, or an empty string if the character set is unknown
Description
Converts a string of the US-ASCII, CP1252 or ISO-8859-1 character set to a string of the UNICODE(UTF-8) character set
Examples
//Returns "Ümlauts all over the place"
DecodeCharSet("\xDCmlauts all over the place", "ISO-8859-1")