Lecture 9B
Unicode
Utility Package  
StringBuffer/Token
Vector/Enumeration
     & Iterator
Hashtable
Dates & Time
Other Utilities
Exercises

Lectures

1A: Introduction
1B: Java Intro
2A: BuildingBlocks
2B: Objects
3A: More Objects
3B: Exceptions
       & Threads
4A: Waves
4B: Nuclear &
       Particle
5A: AWT
5B: More AWT
      & Graphics
6A:Detectors &
      Simulation
6B: LHC/Atlas &
     RandomSims    
7A: Swing
7B: Java2D
8A: Java Apps
8B: Dialogs &
    MoreClasses
9A: Java I/O
9B: Utilities,
        Unicode
10A: More
    Threading
10B: File
    Handling
11A: Array,Print,
    Images
11B: SimplePhysics
    Simulation
12A: Tips &
    Techniques
12B: More Tips &
    Techniques
13A: Satellite
    
Simulations
13B: Intro to Java
    Networking
14A: Java Servers
14B: HTTP Server
15A: ServerClient
15B: ServerClient
   Expt.Simulation
16A: Course
          Review
16B: ExerciseTest
        Discussion

    Contacts
    Description
    Exercises
    Index
    Outline
    Q&A
    Resources
    StudentInfoForm
    Student Pages
    What's New

 

Home : Lectures : Lecture 9B : Unicode
Unicode

Unicode is a character encoding scheme using 16-bit codes. It is the UCS-2 sub-set of the UCS (Universal Character Set) that has a superset of 32-bit encodings.

The large code range allows for a systematic encoding of wide range of alphabets and symbols.

Nearly 40 thousand characters have been defined so far. This compares to the 256 possible characters with ASCII.

See the www.unicode.org site for displays of Charts of Unicode values vs characters.

Internally, Java only uses Unicode for character handling.

In Java a character, if not available on the keyboard, can be represented by its Unicode value given as 4 hex values preceded by the \u escape sequence, e.g. ö is given by \u00F6, è by \u00E8.

UnicodeExample.java

Remember that Fonts determine only how the characters are displayed on the screen or printed on paper.

For a given Font set, a character code will either point to a known font for that code or to a default symbol indicating an unknown character.

We can see what Fonts are available with the current host by using this applet. It shows the row value X and the column value Y for \u00XY Unicode values.

UnicodeFont.java

 

Home Lectures Resources Index Contacts Students


Physics Simulations with JavaTM
KTH, Kurskod: 5A1418
Curator: Clark S. Lindsey