Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java is ASCII or Unicode ??

 
Adam Lim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

can i know java is ASCII or Unicode ??

please advise.

thank you
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java stores strings as UNICODE.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic