ietf-smime
[Top] [All Lists]

Re: How to do UTF-8

1998-02-23 09:00:27
Dave raises a good point.  I support the use of SIZE to ensure that absent
OPTIONAL and present zero length fields are not both possible.  This is one
less path in the code that must be implemented and tested.

Russ

At 03:48 PM 2/20/98 -0500, David P. Kemp wrote:
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 {
 contentDescription UTF8String SIZE(1..MAX) OPTIONAL,
 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>