SetFileEncoding(id, encoding)
id
to the charset specified by encoding
. All subsequent read and write
operations will then be done using the new charset.
This must only be used if the file is a text file. In that case, specifying
the file's charset can be quite convenient because Hollywood will then handle
all charset conversions automatically when reading from or writing to the file
using functions like ReadLine(), ReadString(),
WriteLine() or WriteString(). By default,
Hollywood expects text files to be in the UTF-8 charset because that's Hollywood's
default charset. If you want to read from or write to a file using the ISO 8859-1
encoding instead, just pass #ENCODING_ISO8859_1
in encoding
and Hollywood will
handle all conversions to and from ISO 8859-1 automatically.
See SetDefaultEncoding for a list of available charsets.