WriteChr(id, chr[, encoding])
chrto the file specified by
idand increments the file cursor by the number of bytes written. The character to be written has to be passed to
WriteChr()as a code point value. Note that depending on the encoding, this function might write up to 4 bytes to the file because in UTF-8, a single character may use up to 4 bytes.
encoding parameter can be used to set the character encoding
to use. This defaults to the default string encoding set using SetDefaultEncoding().
See Character encodings for details.
If you need to write a single byte to a file, use the WriteByte() function instead. See WriteByte for details.
OpenFile(1, "Test", #MODE_WRITE) WriteChr(1, 65) CloseFile()This code writes the character "A" to the file Test.