W3C home > Mailing lists > Public > www-tag@w3.org > March 2004

Re: Reviewed charmod fundamentals

From: Tim Bray <tbray@textuality.com>
Date: Mon, 8 Mar 2004 10:12:23 -0800
Message-Id: <261266D4-712C-11D8-95ED-000A95A51C9E@textuality.com>
Cc: www-tag@w3.org <www-tag@w3.org>
To: Elliotte Rusty Harold <elharo@metalab.unc.edu>
On Mar 5, 2004, at 3:16 PM, Elliotte Rusty Harold wrote:

> Speaking as a Java programmer, I do not find UTF-8 to be less Java 
> friendly than UTF-16. Both UTF-8 and UTF-16 need to be passed through 
> a Reader on input and a Writer on output for any sort of robustness to 
> apply.  Which one I choose to use is almost never based on Java's 
> internal storage format for Strings.

I can't deny your experience, but speaking as a Java *and* C 
programmer, my experience is different.  I have the choice of 
generating text in my own language's idiomatic style, *or* of putting 
it through an output filter.  Output filters are not free and every 
cycle burned up in the XML-generation phase is being stolen from 
business logic.

One very small example: I recently wrote an XML-generation library for 
C (see
http://www.tbray.org/ongoing/When/200x/2004/02/20/GenxStatus) and in 
order for maximum usability by C programmers, it only knows UTF-8.  
Thus, it can't be used without extra filtering for any protocol that 
chooses to say "only UTF-16". -Tim


Received on Monday, 8 March 2004 13:13:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:25 GMT