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

Re: XML Max Character Value


java char max value
* Henri Sivonen <hsivonen@i...> [2005-08-14 06:15]:
> On Aug 13, 2005, at 14:19, Alan Gutierrez wrote:
> 
> >    Am I seeing that with Unicode in Java, you need to work with
> >    String and not with individual char? That puts a dent in my
> >    algorithm, which advanced along the characters in the string.
> 
> It depends on what exactly you are doing. A Java char is not a Unicode 
> character but a UTF-16 code unit. The values \u0000 and \uFFFF should 
> never occur in XML and can be used as sentinels if your algorithm works 
> on UTF-16 code units. For the purpose of indexing text, working on 
> UTF-16 code units as opposed to working on Unicode characters may well 
> be good enough. In that case, a surrogate pair can be treated as two 
> adjacent "characters". (Note that even when operating on UTF-32, you 
> can have tightly-coupled characters when there is a base character 
> followed by combining marks, so working on Unicode characters does not 
> buy you inter-character independence.)

    Thank you, Henri.

    It won't matter for the initial application, the implementation
    of <xsl:key/> which is a lookup, but I'd like to be able to use
    indices for sorting as well, so I'm going to have figure out
    how to iterate through Unicode in Java, which I've understood to
    mean some assembly.
    
    I'm only hoping that it's a forward iteration through a sequence
    of bytes or words.

    In any case, I don't want to trouble the group. It will be a
    while before I'm figuring out collation.

    Thanks again, everyone.

--
Alan Gutierrez - alan@e...
    - http://engrm.com/blogometer/index.html
    - http://engrm.com/blogometer/rss.2.0.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.