Upload
diana-vaillant
View
213
Download
1
Embed Size (px)
Citation preview
INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR
PROJECTS
Unicode Escape Sequences
Escape Sequences
Recall the escape sequences you already know
\t is for tab \n is for new line \” is for the double quote \\ is for the backslash \’ is for the single quote
Unicode
Message from unicode.org Welcome! The Unicode Consortium enables
people around the world to use computers in any language. Our freely-available specifications and data form the foundation for software internationalization in all major operating systems, search engines, applications, and the World Wide Web. An essential part of our mission is to educate and engage academic and scientific communities, and the general public.
Unicode
Unicode has developed seemingly endless tables of characters and an associated 4-character, numeric/letter code
Characters can be printed from international alphabets, mathematical operations, arrows and other symbols, and more!
Goto http://www.unicode.org/charts/ to explore
Unicode Escape Sequence
The escape sequence “\u” is used to signify a unicode sequence is coming
For example, Mr. Schmarge studied German in high school and college – 5 years to be exact. In German, that would be fünf years
How do you write this in Java? The unicode for ü is
00FC
Unicode Escape Sequence
Type the below into a BlueJ program:
System.out.println(“Herr Schmarge hat f\u00FCnf Jahren Deutsch studiert”);