6
INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

Embed Size (px)

Citation preview

Page 1: INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR

PROJECTS

Unicode Escape Sequences

Page 2: 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

Page 3: INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

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.

Page 4: INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

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

Page 5: INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

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

Page 6: INCORPORATING CHARACTERS NOT ON THE KEYBOARD INTO YOUR PROJECTS Unicode Escape Sequences

Unicode Escape Sequence

Type the below into a BlueJ program:

System.out.println(“Herr Schmarge hat f\u00FCnf Jahren Deutsch studiert”);