[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Java/Unicode brain damage

  • From: Elliotte Rusty Harold <elharo@m...>
  • To: xml-dev@l...
  • Date: Thu, 26 Jul 2001 13:35:09 -0400

java read unicode
At 10:14 AM -0700 7/26/01, Benjamin Franz wrote:


>I'm being dense today. When you say 'UTF-16 units' do you mean that in
>Java a single character in the surrogate ranges may consist of (correctly
>IMHO) a _complete_ 32-bit surrogate pair or (dain bramagedly) of the
>individual 'halfs' of the pair (thus making a single character into two
>individual 'units' of 16-bits each)?

The latter

>If the latter, the Java's handling of
>Unicode is broken-as-designed and must be fixed (most likely via
>deprecation of the existing String in favor of a completely new string
>type for the sake of backwards compatibility with already deployed apps).
>

It's worse. It's not just the String class. It's the char primitive data type which is much harder to change precisely because it's not a class. 

In 20-20 hindsight, there probably never should have been a char type in the first place, and all APIs should have been designed to work with String and Character objects instead. 
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@m... | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      | 
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.