Most of the string and text library functions accept an optional parameter specifying the character encoding to use. This parameter tells the function how the strings you pass to it are internally formatted, i.e. which character encoding they use.
Normally, you shouldn't have to use this parameter at all because starting with Hollywood 7.0
all text should be stored as UTF-8. Under certain circumstances, however, it might be
necessary to use the optional character encoding parameter. For example, Hollywood
strings can also contain raw binary data. This data of course isn't valid UTF-8 and
thus the string functions will reject it. The only way to operate on this data then
is to tell the respective functions that this isn't UTF-8 encoded data but just a raw
sequence of bytes. This can be done by passing the #ENCODING_RAW constant in the
character encoding parameter.
Here is an overview of the different encodings available in Hollywood:
#ENCODING_UTF8:
#ENCODING_ISO8859_1:#ENCODING_ISO8859_1 can also be
used with other encodings there's also the synonym constant #ENCODING_RAW which
might be less misleading semantically because it doesn't suggest that strings
are in ISO 8859-1 format (see below).
#ENCODING_RAW:#ENCODING_ISO8859_1 but using this instead of #ENCODING_ISO8859_1
might be preferable from a semantic point of view because it doesn't suggest that
strings are or must be in ISO 8859-1 encoding. Instead it simply says that strings
are simply treated as a sequence of raw 8-bit characters.
#ENCODING_AMIGA:#ENCODING_AMIGA allows you to convert
between AmigaOS' default character set and UTF-8 (both ways).
You can use the SetDefaultEncoding() function to change the default character encoding for the string and text libraries. See SetDefaultEncoding for details.