006 How should text values be encoded?

  • Status: accepted
  • Deciders: partners

Context and Problem Statement

When transfering text values and identifiers it is important to have a common meaning of the character values to avoid wrong presentation to the user and non matching identifiers.

Decision outcome

Arrays of char which represent text values are encoded as UTF-8.

No plausible alternatives were presented.

Pros and Cons of the Options

ASCII or Latin1 Codepage

  • Bad, because a limitation to a specific 8-bit charater set does not meet the requirements of modern internationalized software and is not compatible with the OPC-UA specification.

UTF-8

  • Good, because not transcoding is needed when sending it to th OPC-UA server.

UTF-16

  • Bad, because it consumes more memory.
  • Bad, because 16 bit char type is not really compatible.

UTF-32

  • Bad, because of even more memory consumption.