aspose file tools*
The moose likes Beginning Java and the fly likes int value of a char - is it unicode ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "int value of a char - is it unicode ?" Watch "int value of a char - is it unicode ?" New topic
Author

int value of a char - is it unicode ?

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

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


Regards,

Pho
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521

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).]


"JavaRanch, where the deer and the Certified play" - David O'Meara
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

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).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: int value of a char - is it unicode ?
 
Similar Threads
getting alphabets from ascii
ASCII - UNICODE
Numerice value for letter 'a'
KHALID >> MOCK
Detecting linebreaks in files