[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: iCalendar - "octets" question
>Does this mean that in a multi-byte object you SHOULD wrap potentially in
the middle of character?
Probably MAY, rather than SHOULD.
>Does this have any potential problems?
It shouldn't; folding and unfolding lines is defined to be irrelevant to
the semantics of the lines, which means that the simplest way to do it is
to do it below the level of the parser/lexer. By the time the lines reach
the parser, they've been unfolded.
One reason to make sure that splitting characters is explicitly permitted
is that there are legitimate cases in which the code that folds the lines
doesn't actually know it's using multibyte characters. For example, the
iCalendar implementation I did for eCal didn't contain any explicit
character-set code; it was assumed that all the character sets we would
support sending would be supersets of ASCII. The code that did a MIME
wrapper could tag the object as, say, UTF-8, but there was no need for the
code that generated the lines to understand UTF-8; it just used whatever
strings it was given.
/==========================================================\
|John Stracke |Principal Engineer |
|jstracke@xxxxxxxxxxxxxxxxxxxx |Incentive Systems, Inc. |
|http://www.incentivesystems.com|My opinions are my own. |
|==========================================================|
|A man's concepts should exceed his vocabulary, or what's a|
|metaphor? |
\==========================================================/