On 09/21/2012 10:15 AM, Ivan Shmakov wrote:

>       I'm writing an application which has to support the full range
>       of Unicode characters being stored to and retrieved from its
>       (structured) data files, which are to be binary for both space
>       and performance reasons.
>       Although my experience with ASN.1 is limited, it seems like a
>       suitable base format for such an application.  As per [1], my
>       guess is that I should use either UniversalString or UTF8String
>       to store Unicode text strings (though I don't understand the
>       difference.)  However, as per [2], the only character sequence
>       type currently supported by GNU Libtasn1 is GeneralString.


We use UTF8String and UniversalString with libtasn1 in gnutls by
defining it as:
UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING

Of course there is no checking on whether the contents of these fields
conform to any standards. They are treated as opaque.

regards,
Nikos

Reply via email to