OK John, You are right, the 8.21.10 clause makes reference to ISO/IEC 10646-1, Annex D and not the ISO/IEC 2022 standard. Thank you for your help.
Regards, Eddie -----Original Message----- From: John Larmouth [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 10:29 AM To: Eduard Lascu Cc: [email protected] Subject: Re: [ASN1] UTF8 String encoding in BER There seems to be a serious bug here in the spec. 8.21.10 is the clause you need for UTF8String. Clause 8.21.5 should list UTF8String as a further exclusion (notice that it does not appear in table 3), and 8.21.3 should reference 8.21.4, 8.21.5, *and* 8.21.10. I am afraid this text seems to be a bit of a mess! (But I think your encoding is correct!) John L Eduard Lascu wrote: > 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 > > -- Prof John Larmouth Larmouth T&PDS Ltd (Training and Protocol Development Services Ltd) 1 Blueberry Road Bowdon [EMAIL PROTECTED] Cheshire WA14 3LS England Tel: +44 161 928 1605 Fax: +44 161 928 8069 _______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
