1. Home
  2. Localization
  3. Custom Code Page Support

Custom Code Page Support

Starting with the release of Server version 15.2, StayLinked supports the new emulation type VT-SMARTTE. This emulation type supports the use of custom code pages.

When you add the ‘Host Code Page’ emulation property to a VT-SMARTTE Host Entry and set the value to ‘Custom Code Page (custom_codepage.txt)’, then the server process will look for the ‘custom_codepage.txt’ file in the StayLinked Server folder.

There can be only one ‘custom_codepage.txt’ file active on the server, as you cannot have multiple files of the same name in the same directory.

The file contents are a match to the code page as defined in a table. For example, this is a map of Host Code Page 850:

This table represents the character range of 0x80 to 0xFF which is the upper 128 characters of the 256 character ASCII table. Each cell in this table represents a character value which is mapped to the highlighted value for that cell.

The custom_codepage.txt would then contain the following:

In the ‘custom_codepage.txt’ file, all 256 character values are represented, where the first row is positions 0x00 to 0x0F and the last row is positions 0xF0 to 0xFF. In Code Page 850, the lower 128 character positions are a one-to-one mapping with none of these 128 characters being remapped by the code page. Note that the upper 128 character positions are mapped to the highlighted values from the documented CP850 code page.

Each of the 16 rows is made up of 16 columns of 4-digit HEX values separated by a single space character. The first line is (optionally) commented with the pound sign (#) character and will typically describe the code page being defined. Any line starting with the pound sign (#) is ignored as comments. The four-digit HEX values can be upper or lower case. There must be exactly 16 values per row and exactly 16 rows for a total of exactly 256 values.

Once the Code Page is configured on the Server, the Client will be instructed to display the remapped values for the ASCII character range. Unicode values above 0x00FF should be automatically supported, since they are outside of the ASCI range. If a custom font is required, the font can be provided to the client as a session.ttf file as described in the section for recognized file transfers.

Updated on October 21, 2021

Related Articles