Name
SetDefaultEncoding -- set default character encoding (V4.7)
Synopsis
SetDefaultEncoding(tencoding[, sencoding])
Function
This function can be used to change the default character encoding for the text and string libraries. Note that for reasons of compatibility Hollywood maintains two different default character encodings: one for the text library and one for the string library. Under normal conditions, however, both default encodings should be set the to the same character encoding.

The default character encoding for the text library is specified in tencoding and affects functions such as Print(), NPrint(), TextOut(), and CreateTextObject().

The default character encoding for the string library needs to be specified in the sencoding parameter and affects most functions of the string library, i.e. functions such as ReplaceStr() and StrLen().

The following character encodings are currently supported by Hollywood:

#ENCODING_UTF8:
Use UTF-8 encoding. This is the default since Hollywood 7.0.

#ENCODING_ISO8859_1:
Use ISO 8859-1 encoding. This was the default prior to Hollywood 7.0. Note that for historical reasons specifying #ENCODING_ISO8859_1 on AmigaOS and compatibles doesn't really mean ISO 8859-1 but whatever is the system's default character encoding. On most Amiga systems, this is ISO 8859-1 anyway, but Eastern European systems use a different encoding for example.

Starting with Hollywood 7.0, #ENCODING_ISO8859_1 shouldn't be used any longer. It is still supported for compatibility reasons but it can lead to problems on non-ISO-8859-1 systems. You should always use #ENCODING_UTF8 starting with Hollywood 7.0.

Inputs
tencoding
default character encoding for the text library
sencoding
default character encoding for the string library (V7.0)

Show TOC