Summary
How to pass strings using non-default codesets
Environment
Artix 5.6.x
All supported platforms
Question/Problem Description
How to configure the codesets used by Artix
How to change the codesets used by Artix
How to specify the codeset for strings passed by an application
How to convert the codeset of strings received by an application
Clarifying Information
The default codeset used by Artix is determined by the platform. However, there may be times when users are required to use a different codeset.
This article demonstrates how non-default codesets can be used by Artix.
Resolution
The codesets used by Artix can be specified through five configuration variables:
plugins:codeset:always_use_default
Set to "true" to use default codesets. Set to "false" to configure alternative codesets.
plugins:codeset:char:ncs and plugins:codeset:wchar:ncs
Specifies native codeset to use. This is applied to all characters and wide-characters sent from the CORBA application.
plugins:codeset:char:ccs and plugins:codeset:wchar:ccs
Specifies the list of conversion codesets to use. This can be applied to any characters and wide-characters sent to the CORBA application.
The codeset used in an Artix request is negotiated between the client and server, using the above configuration variables. To summarise this negotiation:
- If the sender and receiver both share the same NCS, this codeset is used for the request.
- Else, if the NCS on one side matches a CCS on the other, this codeset is used for the request.
- Else, if the sender and receiver share a common CCS, this codeset is used for the request.
- Else, if the sender and receiver share a compatible CCS, UTF-8 is used for the request.
- Finally, if none of the above conditions are met, an INCOMPATIBLE_CODESET exception is thrown.
#Orbix
#Artix
#configuration
#KnowledgeDocs