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 textString to convert
STRING charsetCharacter set of the original string
Return value
STRINGThe 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")