Unicode Support

From version 3.2.4.0 AutoIt is supplied with both Unicode and ANSI compiled versions. The Unicode versions are the default for Windows NT, Windows 2000, Windows XP and later. ANSI versions are supplied for backwards compatibility with Windows 9x systems. AutoIt executables with an A on the end are the ANSI versions. For example:

The Unicode versions will allow our international friends to finally use AutoIt with extended characters and scripts!

Note: the Unicode version of AutoIt (AutoIt3.exe) and scripts compiled in Unicode mode will only run on Windows NT/2000/XP/2003/Vista and later machines. To allow scripts to run on Windows 9x scripts must be compiled using the ANSI compiler (Aut2ExeA.exe).

AutoIt will read script files in ANSI, UTF16 (big or little endian) and UTF8 formats. In addition, functions such as FileReadLine will automatically read text from ANSI and UTF16/UTF8 text files providing a valid BOM is found. UTF files without a valid BOM will be treated as ANSI.

Output functions such as FileWriteLine can use ANSI, UTF16 (big or little endian) and UTF8 formats - but the file must be opened in the desired mode using the desired FileOpen flags otherwise the default ANSI mode is used.

The supported file formats for text files and scripts as saved in Notepad and the AutoIt SciTe editor are shown in this table:

AutoIt Notation Notepad SciTe
ANSI ANSI 8 bit / Code Page Property
UTF16 Little Endian Unicode UCS-2 Little Endian
UTF16 Big Endian Unicode big endian UCS-2 Big Endian
UTF8 UTF-8 UTF-8 with BOM

 

The recommended Unicode format is UTF16 Little Endian - this is how strings are stored within AutoIt and therefore require less processing/conversion when reading/writing. However, the UTF8 format will use less space in script files and is also a good choice.

 

Current Limitations

There are a few parts of AutoIt that don't yet have full Unicode support. These are:

These limits will be addressed in future versions if possible.