aspose file tools*
The moose likes Beginning Java and the fly likes java is ASCII or Unicode ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java is ASCII or Unicode ??" Watch "java is ASCII or Unicode ??" New topic
Author

java is ASCII or Unicode ??

Adam Lim
Greenhorn

Joined: Mar 13, 2007
Posts: 5
hi all,

can i know java is ASCII or Unicode ??

please advise.

thank you
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Java stores strings as UNICODE.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

See JLS - Lexical Structure...
Programs are written in Unicode (�3.1), but lexical translations are provided (�3.2) so that Unicode escapes (�3.3) can be used to include any Unicode character using only ASCII characters.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4637
    
    5

Java is Unicode. But the first set of characters in Unicode are ASCII, specifically US-ASCII. So since ASCII is a subset of Unicode, its trivial to do work in ASCII within Java.

But writing ASCII only code in java is bad form unless its just quick and dirty.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java is ASCII or Unicode ??
 
Similar Threads
==
ASCII to UNICODE
ASCII characters AND Java characters
Java Character Declaration Format
working with Strings