ietf-smime
[Top] [All Lists]

Re: How to do UTF-8

1998-02-20 13:52:43
From: Paul Hoffman / IMC <phoffman(_at_)imc(_dot_)org>

And while we're UTF8'ing, we should also replace the DirectoryString in
the ContentHints attribute:

ContentHints ::= SEQUENCE {
\xA0 contentDescription UTF8String SIZE(1..MAX) OPTIONAL,
\xA0 contentType OBJECT IDENTIFIER }

I don't see any reason to do the SIZE(1..MAX). It made sense for the old
strings, but I don't think we need it here. Can we elide it?


I agree that an upper bound on the string size may not be useful (and
may be difficult to translate into a buffer size for variable-length
UTF8 characters), but this SIZE clause has a different purpose:
to force the string to have at least one character.
An omitted OPTIONAL variable length item (SEQUENCE OF, xxxString, etc)
can have two possible encodings - absent, or zero length.  By forcing
the item in question to have at least one element, the encoding
ambiguity is eliminated.  I've gotten in the habit of including the
SIZE clause as boilerplate.

I believe someone mentioned some time ago that this was a problem that
should be addressed in X.680/690, instead of in every application protocol.
But AFAIK it has not been addressed yet.

<Prev in Thread] Current Thread [Next in Thread>