Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

int value of a char - is it unicode ?

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read in an XML file via a FileReader like this:

The read() method returns an int. How does this
int value relate to the Unicode character space
which spans from 0x0000 to 0xFFFF. For example,
in W2K, the newline character has the value 10
which corresponds to 0xA.
Thanks
Gavin
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The space, line separator and paragraph separator are whole ranges of integers.
Is this what you mean?

[This message has been edited by Cindy Glass (edited September 21, 2001).]
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I've forgotten how to present unicode literals.
'\uXXXX' is exactly what I need.
Thanks
Pho
[This message has been edited by Pho Tek (edited September 23, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic