Integrate the Secure Messaging SDK Server Font Tables

Prev Next

To support various character encodings, the Secure Messaging SDK provides an interface to support up to four different encodings at the same time. You can select which tables to use; to do so, pass a set of the relevant table indexes to the SDK.

If you do not need to use all four available tables, set the unused table(s) to empty.

Be careful when you assign proper indexes for each table—an empty table cannot appear on an index at a lower position than any valid table index!

For more information about the technical implementation, refer to the technical documentation provided with the SDK.

For a description of the content of each provided table, see Secure Messaging SDK Server Font tables.

The default set includes the following tables:

  • ISO-8859-15

  • Katakana

  • Central and Eastern Europe

  • Greek

In addition to the default font tables, a font table for Turkish is also available.

UTF-8 encoding in Unicode Basic Multilingual Plane

The SDK also supports UTF-8 encoding of characters in the Unicode Basic Multilingual Plane (BMP), allowing formatted text fields to carry any character from the Unicode Basic Multilingual Plane (accented Latin, €, Cyrillic, CJK etc.) in transaction, challenge, and free-text messages.

Servers can produce messages using the FORMATTED_TEXT_FONT_TABLE_INDEX_UTF8_BMP (5) font table index, and the SDK uses it to encode the message body as raw UTF-8 bytes and set the encoding type field in the message header accordingly. This then signals to the client SDK that the content uses UTF-8 BMP rather than the legacy 16-bit 3-character encoding.

To control which characters are permitted in UTF-8 BMP–encoded fields, servers can call setUtf8BmpAllowedCharacters, passing a string whose individual characters form the allowlist. The default is null, and when this is passed all valid BMP characters are accepted. Any character that violates the allowlist, or that is a surrogate or forbidden control character, causes the SDK to throw a SecureMessagingSDKException with FONT_TABLE_UNSUPPORTED_CHARACTER.

Only use UTF-8 BMP encoding when all clients that receive these messages use Secure Messaging SDK Client 4.35.0 or later. Earlier client versions do not support UTF-8 BMP, they decode this type of message with the legacy encoding, so the text is displayed incorrectly or the message is rejected.

Also, message capacity is lower. The body limit is still 1024 hex characters, which is max. 512 bytes in UTF-8. How many characters effectively fit into the message depends on the characters used:

  • ASCII: 512 characters

  • Latin: 256 accented characters

  • CJK characters or €: 170

For comparison: with Cronto encoding, the same limit holds about 768 characters. We recommend checking message length when switching between encodings.

The mapping is static and applies to the entire process.

API reference documentation and sample applications

To learn more about the public APIs and their functions, exceptions, and error codes, refer to the technical documentation that is included in the product package for each SDK and each platform. In the product package, you can also find the sample applications provided for each platform to see examples of how the SDKs can be used.

These sample apps are intended only to demonstrate basic scenarios and SDK usage. They are not designed to be copied directly into production projects!