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

Re: Java/Unicode brain damage

  • From: Duane Nickull <duane@x...>
  • To: Joel Rees <rees@m...>
  • Date: Thu, 26 Jul 2001 06:25:37 -0700

java unicode
Joel Rees wrote:


> The char in C is a byte, and most C libraries assume strings are built of
> bytes, so C tends to use variable width characters.(Read that as UTF-8 for
> Unicode.) You can't back up safely with shift-JIS, so you sometimes dump
> things temporarily to fixed-width buffers when you need random access.
> Although you can back up safely with UTF-8, it's still sometimes convenient
> to temporarily dump a UTF-8 string to a constant width buffer. Since these
> buffers are rather local in nature (can't be worked on by most of the
> standard libraries at this time), widening them to 32 bits when 16 bits had
> been used does not usually cause any ripples.

 >>>>>>>>>>


Do you know if the C++ STL operates in a similar fashion?  It is usually 
  a pain to write portable C and C++ programs supporting
UTF-16. After the last Unicode conference,  I saw papers suggesting a 
language extension to support portable programs using UTF 16 with a 
C/C++ language extention.

One of the main problem talked about was pertaining to literal strings. 
  While is is aparently not rocket science to compose portable C and C++ 
programs using a fixed 16-bit (unsigned) integral data type as the 
character, it often means that you cannot use literal strings or the 
platform's
runtime libraries.

C'est la vie...

Duane Nickull


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.