[standards-jig] JIDs (JEP-0029)

Dave dave at dave.tj
Wed May 1 02:58:08 UTC 2002

Unicode kinda sucks in this way.  Ritchie and Kernighan had an easy
choice to make, because the end user (i.e., the programmer) could easily
be informed that the limit was 31 characters (=31 bytes), and the compiler
could easily truncate everything after that.  Now, we have a fake wchar_t
type, in that it's actually a char[], and what's worse is we don't even
have a standard length for each of those arrays.  A computer's memory (and
therefore, each of the buffers in a Jabber client) is allocated by bytes,
not arrays of characters each being of variable length.  (Of course,
if you're using C++ templates, creating a vector of unicode characters
is quite easy, and you'll then be harmed a lot more by the byte limit -
because you'll have to figure out how many bytes are being represented
by any given unicode character buffer.)

 - Dave

Iain Shigeoka wrote:
> --- Dave <dave at dave.tj> wrote:
> > You must agree anyway that telling users to count the bytes required by a
> > resource name they choose isn't exactly "nice," forcing them to manually
> > encode their chosen resource name to make sure it's not too long ... so
> > if somebody can find a simple way to make the standard dictate in terms
> > of characters without requiring implementations to utf-unencode resources,
> > I'd definitely vote for that.  Sadly, though, we may be out of luck :-(
> I'll have to vote against you Dave.  :)  I understand your concern but
> think the technical standard should be in bytes.  256 bytes seems
> very reasonable.
> End users should never know about the standard. Their user agent
> should let them know about limits appropriately.  In other words,
> the user agent, should know its 256 bytes, and that the current
> encoding is X so there are Y bytes per character.  when the user
> hits the registration dialog, it should do the math and present the
> limit in terms of characters based on the current encoding.
> This places the burden of user interface issues where it should be
> (the user agent), and is technically clean and efficient for
> implementors.
> My 2 cents.
> -iain
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
> _______________________________________________
> Standards-JIG mailing list
> Standards-JIG at jabber.org
> http://mailman.jabber.org/listinfo/standards-jig

More information about the Standards mailing list