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

Re: UTF-8 Question: e with acute accent should requiretwo byte

  • From: Jonathan Robie <jonathan.robie@r...>
  • To: "Costello, Roger L." <costello@m...>
  • Date: Fri, 28 Sep 2007 11:21:11 -0400

Re:  UTF-8 Question: e with acute accent should requiretwo byte
Hi Roger,

UTF-8 uses an 8 bit encoding. E9 fits in 8 bits. It doesn't fit in 7, 
but there's no such thing as UTF-7, the problem you refer to is an ASCII 
7-bit problem. Since 8 bits represents twice as many characters as 7 
bits, it's enough to represent most European languages using one byte 
per character.

Jonathan

Costello, Roger L. wrote:
> Hi Folks,
>  
> Consider this element:
>  
> <title>My Resumé</title>
>
> Notice: é (the character "e" with an acute accent). It is U-00E9
>
> Since its code point is greater than U+0080, it requires more than one
> byte. 
>
> Hex E9 = Decimal 233.  This has the binary: 11101001
>
> I believe that it is encoded in UTF-8 as two bytes:
>
>   11000011 10101001
>
> These bytes correspond to hex C3 and hex A9.
>
> Thus, é should be encoded in UTF-8 as:
>
>   C3A9
>
> The code points of the other characters (My Resum) are all less than
> U-0080, and so the UTF-8 encoding of those characters should be only
> one byte.
>
> So, this is what I believe should be the bytes:
>
>  M y    R  e s  u m   é
> 4D79 2052 6573 756D C3A9
>
> Do you agree?
>
> However, when I view the bytes in my hex editor I get this:
>
>  M y    R  e s  u m  é
> 4D79 2052 6573 756D E9
>
> Notice that é uses only one byte.
>
> Something is wrong.  Here's what I think may be wrong:
> - the editor that I am using to display the hex values is displaying
> the code points and not the hex values. However, I have now tried two
> editors, and they both display the same thing (E9).  So perhaps the
> editor isn't the problem.  Perhaps I'm the problem, and am
> misunderstanding something.  Help!
>
> /Roger
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l...
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>
>   



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.