How AR System derives a codeset in an API program


When your API program calls ARInitialization, AR System derives a client request codeset from the locale information in ARControlStruct as follows:

  • If the ARControlStruct.locale.charset field contains a string, AR System uses that string to determine the codeset.
  • If the ARControlStruct.locale.charset field is empty, ARInitialization examines the ARControlStruct.locale.locale field. If this field contains a string of the form, lang_COUNTRY.codeset or lang_COUNTRY.codeset@modifiers, AR System uses the substring beginning with codeset to determine the proper codeset to use.
  • If the ARControlStruct.locale.charset and ARControlStruct.locale.locale fields are empty, AR System tries to determine the client request codeset from the system environment.

The API recognizes the following codeset strings:

  • UTF-8—The client must communicate with the API in the UTF-8 character encoding of Unicode.
  • "" (empty)—The client must determine the client request codeset from the system environment.

The API generates an error when the ARControlStruct.locale.charset field or the codeset portion of the ARControlStruct.locale.locale contain a string other than UTF-8 or an empty string.

The API detects a change to the codeset and immediately applies it. This enables an API program to change its codeset between API calls.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*