help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GeneralString, UniversalString, or UTF8String?


From: Nikos Mavrogiannopoulos
Subject: Re: GeneralString, UniversalString, or UTF8String?
Date: Sun, 23 Sep 2012 12:08:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120805 Icedove/10.0.6

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

[Prev in Thread] Current Thread [Next in Thread]