# About Tera Term 5

Tera Term 5 is the next version of Tera Term 4 with Unicode supporting.

## feature

- Terminal (internal buffers, drawing and key input) is supported Unicode.
  - Multiple languages Display is possible.
    In Tera Term 4, Chinese could not be displayed when Japanese is displayed.
  - ISO8859-1...16 are supported.
  - Locale settings are no longer required.
- Windows UI(Menu, Dialogs) are supported Unicode
  Menus and Dialogs will display correctly in the language you set in the following cases
  - When a language other "Current system locale" is set.
  - When "Use Unicode UTF-8 for worldwide language support" is checked.
- Switching to Unicode from ANSI versions of Windows APIs
  Unicode file names can be used.
- Macro
  - Internal code is Unicode (UTF-8)
    Internal code in Tera Term 4 is ACP (CP932,Shift_JIS by default in Japanese Windows).
  - GUI(dialogs) can be displayed in multiple languages.

## requirements

- See requirements page.
  Windows versions that is not targeted by Visual Studio 2022 are not supported.

## misc

- Development tools, libraries , etc.
- implementation status
- LogMeTT, TTLEditor, and Collector have been removed from the installer. Source codes for this tools are not available and This tools are not open source license.

# Migrate to Tera Term 5

Tera Term 5 can install with Tera Term 4. However, ony one of them can be associated to a macro file(.TTL).

## configuration files

- Tera Term 5 can use the setup file for Tera Term 4 without modification.

- Configuration files became Unicode.
  - character encoding of TERATERM.INI and KEYBOARD.CNF.cfg is UTF-16 (with LE BOM).
  - character encoding of cygterm.cfg is UTF-8 in Cygwin 3.3.4.
- Tera Term 5 suports UTF-16 (with LE BOM) ini file.
  - Win32APIs for ini files are used Unicode version. cf. Win32API/ini file
    Tera Term 4 does not use the Unicode version of the API. the item in ini file could not be handled correctly if non ACP characters are included.
  - cygterm.cfg is not using Win32API.
- Tera Term 5 automatically converts character encoding of TERATERM.INI files to UTF-16 (with LE BOM) when Tera Term 5 starts if TERATERM.INI is not UTF-16 (with LE BOM).
  Before conversion, original ini file is backed up.
- Tera Term 5 uses UTF-16 (with LE BOM) character encoding saving setup file (TERATERM.INI).

- Tera Term 4 can read ini files saved by Tera Term 5.

- Tera Term 4 can read UTF-16 (with LE BOM) ini files (on Windows 2000 or later). cf. Win32API/ini file
  Item in ini file cannot be handled correctly if non ACP characters are included.

- The default folder for configuration files has been changed.
  - Now %APPDATA%\teraterm5 (C:\Users\[username]\AppData\Roaming\teraterm5)
    - cf. about folder
    - In Tera Term 4, the folder of the configuration files were the same as the folder where the executable file was placed.
    - In Tera Term 5, "My Documents\TERATERM.INI" does not read.
  - Copy Tera Term 4 setup files for use existing settings.
    - TERATERM.INI
    - KEYBOARD.CNF
    - cygterm.cfg
  - If the files are not exists, the default configuration file is copied when ttermpro.exe start.
- Default values have been changed.
  - DPIAware "off"->"on"
  - ClearOnResize "on"->"off"
  - PrinterCtrlSequence "on"->"off"
  - AuthBanner "1"->"3"

## macro

- UTF-8 is recommended for the character encoding of the ttl file.
- When reading a ttl file, it automatically determines the character encoding of the file and read while converting to UTF-8. However, the automatic determination of encoding can be incorrect.
  Adding the BOM it will be read as UTF-8.
- The maximum number of labels and variables (numeric, string, numeric array, and string array) is unlimited from 256.
- The maximum string length for character variables is 511 bytes, the same as Tera Term 4.
  for example, Kanji character increase the number of bytets per character. (example "©" is 0xc2,0xa9 in UTF-8, 0xa9 in iso-8859-1.) String that could be set in Tera Term 4 may be corrupted in Tera Term 5.
- The unit of character length and character position (index, pos) for macro commands that handle characters is byte. This is the same as Tera Term 4.
  However, the value is different from that of Tera Term 4 because the internal character encoding is different.
- Performing a string operation that breaks a sequence of bytes will break the character (string).This is the same as Tera Term 4.
- If there are any specifications or missing features that do not fit the Unicode, Please let us know
  The following commands will be fix
  code2str, str2code
    Change ASCII code to Unicode code points

## plugin

- compat_w95.h is no longer needed.
  - r9239
- Changed plugin API
  - filename string is Unicode (type is 'wchar_t' from 'char')
  - trunk/teraterm/ttsetup.h
  - 4-stable/teraterm/ttsetup.h
- Common functions for reading and writing ini files have been added.
  - Added a function that converts only file names to Unicode and performs the same operation as before.
  - trunk/teraterm/common/inifile_com.h
- Change member in struct tttset (tttypes.h)
  - Unicode versions of filename, path, and string members with W have been added.
  - Character length for file names and paths is unlimited (independent of MAX_PATH).
  - Modifications will continue(member name, order, size, type, etc...).
- Changed The API for notification icons
  - High DPI is supported.
  - SetVerNotifyIcon(), SetCustomNotifyIcon(), GetCustomNotifyIcon() was removed.
  - trunk/teraterm/ttpcmn/ttcmn_notify.h
- Add Help API
  - Added API for Unicode filename support.
  - trunk/teraterm/ttpcmn/ttcmn_lib.h