int hw_GetEncoding(struct hwTagList *tags);
HWOS_ENCODING_UTF8
unless they explicitly request to run in ISO 8859-1 mode. Note that even if a script requests ISO 8859-1
encoding, hw_GetEncoding()
will still return HWOS_ENCODING_UTF8
if you call it while being in either the
InitPlugin() or InitLibrary() function because the encoding
requested by the script will be set while parsing it and both InitPlugin() and InitLibrary()
are called before that.
Thus, it is probably a better idea to install a callback of type HWCB_ENCODINGCHANGE
. Such a
callback will be run immediately whenever the encoding changes. See hw_RegisterCallback for details.
This function can return the following values:
HWOS_ENCODING_UTF8:
HWOS_ENCODING_ISO8859_1:
You may also pass a tag list to hw_GetEncoding()
that can contain the following tags:
HWGENCTAG_STRING:
int
in the pData
member of the tag. Hollywood will then return
the current string encoding in that int
. (V9.0)
NULL
for the time being