Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BER string types use all UTF-8 encoding but X.690 says otherwise #42

Open
terefang opened this issue Sep 25, 2021 · 0 comments
Open

BER string types use all UTF-8 encoding but X.690 says otherwise #42

terefang opened this issue Sep 25, 2021 · 0 comments

Comments

@terefang
Copy link

terefang commented Sep 25, 2021

lets cite ITU-T X.690-2021 aka ISO/IEC 8825-1:2021 (E):

8.23.5 For restricted character strings apart from UniversalString, UTF8String and BMPString, the octet string shall
contain the octets specified in ISO/IEC 2022 for encodings in an 8-bit environment, using the escape sequence and character
codings registered in accordance with ISO/IEC 2375.

which in java translates to US-ASCII or for more tolerance the ISO-8859-1 charset

8.23.7 For the UniversalString type, the octet string shall contain the octets specified in ISO/IEC 10646, using the 4-
octet canonical form (see 13.2 of ISO/IEC 10646). Signatures shall not be used. Control functions may be used provided they
satisfy the restrictions imposed by 8.23.9.

which in java translates to UTF-32 or rather transformed from UCS-4

8.23.8 For the BMPString type, the octet string shall contain the octets specified in ISO/IEC 10646, using the 2-octet BMP
form (see 13.1 of ISO/IEC 10646). Signatures shall not be used. Control functions may be used provided they satisfy the
restrictions imposed by 8.23.9.

which in java translates to UTF-16 or rather transformed from UCS-2

@terefang terefang changed the title ber string types use all UF-8 encoding but X.690 says otherwise BER string types use all UTF-8 encoding but X.690 says otherwise Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant