I am trying to implement an encoding/decoding function for UTF 8 Strings in
BER. The standard (ITU-T X.690 - 07/2002), clauses 8.21.3 and 8.21.5 explain
that strings (other than UniversalString and BMLString) should be encoded
according to the ISO/IEC 2022 standard. Can anybody here confirm that the
octets for each character should be encoded according to the following
table?

Table 1. UTF-8 encoding
===============================================
bytes bits representation
1      7   0bbbbbbb
2     11   110bbbbb 10bbbbbb
3     16   1110bbbb 10bbbbbb 10bbbbbb
4     21   11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
===============================================
Each b represents a bit that can be used to store character data.

Best regards,
Eddie

_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to