- Index
- »
- io
- »
- func:ioCharset
def
func:ioCharset
ioCharset(handle, charset)
Configure an I/O handle to use the specified charset. The handle is any supported I/O handle and the charset is a string name supported by the JVM installation. Standard charset names:
- "UTF-8" 8-bit Unicode Transformation Format
- "UTF-16BE": 16 bit Big Endian Unicode Transformation Format
- "UTF-16LE" 16 bit Little Endian Unicode Transformation Format
- "ISO-8859-1": Latin-1 code block
- "US-ASCII": 7-bit ASCII
Examples:
// write text file in UTF-16BE ioWriteStr(str, ioCharset(`io/foo.txt`, "UTF-16BE")) // read CSV file in ISO-8859-1 ioCharset(`io/foo.csv`, "ISO-8859-1").ioReadCsv