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

Did u all know this ??????

 
Padmaja Balaji
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is something which read from JLS :
The Java programming language specifies a standard way of transforming a program written in Unicode into ASCII that changes a program into a form that can be processed by ASCII-based tools. The transformation involves converting any Unicode escapes in the source text of the program to ASCII by adding an extra u-for example, \uxxxx becomes \uuxxxx-while simultaneously converting non-ASCII characters in the source text to a \uxxxx escape containing a single u.
This transformed version is equally acceptable to a compiler for the Java programming language ("Java compiler") and represents the exact same program. The exact Unicode source can later be restored from this ASCII form by converting each escape sequence where multiple u's are present to a sequence of Unicode characters with one fewer u, while simultaneously converting each escape sequence with a single u to the corresponding single Unicode character.
Implementations should use the \uxxxx notation as an output format to display Unicode characters when a suitable font is not available.
So, I tried with this simple program :
class trial
{
public static void main(String[] arg)
{
char c = '\u0061';
char d = '\uu0061';
System.out.println(c + ", " + d);
}
}
The output is a,a
How friendly they are, isn't it!!
- Paddy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic