13.1 Overview

Hollywood 7.0 finally introduces full Unicode support. Before Hollywood 7.0 the program was limited to ISO 8859-1 on Windows, Linux, and macOS, and to the system's default charset on AmigaOS and compatible systems. Hollywood 7.0 now comes with full Unicode support which is implemented using the UTF-8 character encoding. Thus, starting with Hollywood 7.0, all your scripts should be saved in the UTF-8 character encoding, either with or without BOM.

All text stored inside strings will now be stored as UTF-8 and all the functions in the string and text libraries will now expect UTF-8 formatted text by default. It is possible to put Hollywood in legacy mode, i.e. to force it to use ISO 8859-1 or the system's default charset on AmigaOS, by using the ‘-encoding’ console argument or its counterpart in the @OPTIONS preprocessor command, but this is not recommended because in legacy mode, your script isn't guaranteed to run flawlessly on different locales.

All string and text library functions that need to operate on characters within strings accept an optional encoding parameter which allows you to set the character encoding the string uses. Normally, it is not necessary to use this optional encoding parameter because it is highly recommended to always use UTF-8. In some cases, however, it might be handy to be able to have string and text functions operate on encodings different from UTF-8. This is especially so if you need to operate on raw binary data stored in a string. In that case, you can just pass the #ENCODING_RAW constant to the respective functions to tell them that you wish to operate on the raw binary data inside the string instead of characters stored in UTF-8 encoding. The string functions won't perform any integrity checks on the string that is passed to them and will just operate on the raw binary data stored inside the string.

To change the default character encoding for the string and text libraries, you can use the SetDefaultEncoding() function. See SetDefaultEncoding for details. However, this is normally not needed and you should just keep #ENCODING_UTF8 as the default encoding.

If you need to listen to non-English keys, you have to use the new VanillaKey event handler with InstallEventHandler(). VanillaKey supports the complete Unicode range of characters whereas OnKeyDown and OnKeyUp only support control keys and standard English keys. See InstallEventHandler for details.

In the course of the transition to Unicode in Hollywood 7.0 there might be some compatibility issues with older scripts. All potential issues are discussed in the compatibility section. See Compatibility for details.

Finally, please note that Hollywood's text renderer currently only supports traditional text, i.e. text that is laid out from left to right on horizontal lines. The text renderer currently doesn't support text that runs from right to left or vertical text.

Show TOC