© 2005 IBM Corporation 28th Internationalization and Unicode Conference Getting Started with ICU George Rhoten IBM Globalization Center of Competency.

Slides:



Advertisements
Similar presentations
From UCS-2 to UTF-16 Discussion and practical example for the transition of a Unicode library from UCS-2 to UTF-16.
Advertisements

Formal Language, chapter 4, slide 1Copyright © 2007 by Adam Webber Chapter Four: DFA Applications.
XHTML Basics.
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
The Web Warrior Guide to Web Design Technologies
21 st International Unicode Conference Dublin, Ireland, May Optimizing the Usage of Normalization Vladimir Weinstein Globalization.
 2005 Pearson Education, Inc. All rights reserved Introduction.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
1 Real-Time System Design Developing a Cross Compiler and libraries for a target system.
Introduction to a Programming Environment
Lab 1 Instructor: Jolanta Soltis.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Homework Reading –Finish K&R Chapter 1 (if not done yet) –Start K&R Chapter 2 for next time. Programming Assignments –DON’T USE and string library functions,
Cupertino, CA, USA / September, 2000First ICU DeveloperWorkshop1 Date/Time/Number Formatting Alan Liu Globalization Center of Competency IBM Emerging Technology.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
San José, CA – September, 2004 Localizing with XLIFF and ICU Markus Scherer Raghuram (Ram) Viswanadha IBM San.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Javascript and the Web Whys and Hows of Javascript.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
119th International Unicode ConferenceSan Jose, California, September 2001 An Overview of ICU Helena Shih Chapman Doug Felt
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Introduction to Shell Script Programming
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Java: Chapter 1 Computer Systems Computer Programming II.
San Jose, California, September 2002 Compact Encodings of Unicode Markus W. Scherer Unicode/G11N Software Engineer IBM Globalization Center of Competency.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
CSC 142 B 1 CSC 142 Java objects: a first view [Reading: chapters 1 & 2]
Unicode Support in ICU for Java Doug Felt Globalization Center of Competency, San Jose, CA.
Java Introduction to JNI Prepared by Humaira Siddiqui.
Getting Started with ICU
Using CookCC.  Use *.l and *.y files.  Proprietary file format  Poor IDE support  Do not work well for some languages.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 26 Internationalization.
Chapter 12: Internationalization Processing Date and Time Processing Date and Time  Locale  Date  TimeZone  Calendar and GregorianCalendar  DateFormat.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 15: More-Advanced Concepts.
26th Internationalization and Unicode ConferenceSan Jose, September 2004 Getting Started with ICU Vladimir Weinstein Eric Mader.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Introduction to Java Lecture Notes 3. Variables l A variable is a name for a location in memory used to hold a value. In Java data declaration is identical.
Cupertino, CA, USA / September, 2000First ICU Developer Workshop1 Sorting and Searching Helena Shih GCoC Manager IBM.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Fall 2002CS 150: Intro. to Computing1 Streams and File I/O (That is, Input/Output) OR How you read data from files and write data to files.
1 Chapter 20 Internationalization. 2 Objectives F To describe Java's internationalization features (§ 20.1). F To construct a locale with language, country,
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
San Jose, California September 2002 What is ICU? Roadmap and Myths Helena Shih Chapman ICU Development Manager IBM Globalization Center of Competency.
Cupertino, CA, USA / September, 2000First ICU Developer Workshop1 ICU Low-level Utilities and Resource Management Vladimir Weinstein Globalization Center.
Announcements Assignment 1 due Wednesday at 11:59PM Quiz 1 on Thursday 1.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
 Prepared by: Eng. Maryam Adel Abdel-Hady
NXT File System Just like we’re able to store multiple programs and sound files to the NXT, we can store text files that contain information we specify.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Intro to ETEC Java.
PHP Introduction.
Choice of Programming Language
Instructor: Prasun Dewan (FB 150,
Operation System Program 4
How to Run a Java Program
An Introduction to Java – Part I, language basics
PHP.
Introduction C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell.
Homework Reading Programming Assignments Finish K&R Chapter 1
Presentation transcript:

© 2005 IBM Corporation 28th Internationalization and Unicode Conference Getting Started with ICU George Rhoten IBM Globalization Center of Competency

Orlando, Florida, September, th Internationalization and Unicode Conference Agenda  What is ICU?  Getting & setting up ICU4C  Using conversion engine  Using break iterator engine  Using resource bundles  Getting & setting up ICU4J  Using collation engine  Using message formats

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference What is ICU?  International Components for Unicode  Globalization / Unicode / Locales  Mature, widely used set of C/C++ and Java libraries –Basis for Java 1.1 internationalization, but goes far beyond Java 1.1  Very portable – identical results on all platforms / programming languages –C/C++: 30+ platforms/compilers –Java: IBM & Sun JDK –You can use: C/C++ (ICU4C), Java (ICU4J), C/C++ with Java (ICU4JNI)  Full threading model  Customizable  Modular  Open source – but not viral

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Getting ICU4C  Use a stable release – –Get the latest release –Get the binary package –Source download for modifying build options –Get documentation for off-line reading  Bleeding edge development –Download from CVS –

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Setting up ICU4C  Download & unpack binaries  If you need to build from source, read ICU’s readme.html –Windows: MSVC.Net 2003 project files Cygwin (MSVC 6, gcc, Intel and so on) –Follow Unix readme.html instructions –Some advanced options may work differently –Unix & Unix like operating systems: runConfigureICU … make install make check

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Commonly Used Configure Options  --prefix=directory >Set to where you want to install ICU  --disable-64bit-libs >Build 32-bit libraries instead of 64-libraries  --with-library-suffix=name >Allows you to customize the library name >Highly recommended when not using the default configure options  --enable-static >Build static libraries >Helpful for when you want to avoid “DLL hell” >Minimize footprint when using a small amount of ICU >If you’re building on Windows, read the readme.html

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Commonly Used Configure Options (Part II)  --with-data-packaging=type >Specify the type of data that ICU’s large data library should be packaged >Specify files, archive or library  --disable-renaming >Disable the ICU version renaming >Not normally recommended  --enable-debug >Enable building debuggable versions of ICU >Use with runConfigureICU before you specify the platform target  --disable-release >Disable building optimized versions of ICU >Use with runConfigureICU before you specify the platform target

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Testing ICU4C  Windows - run: cintltst, intltest, iotest  Unix - gmake check  See it for yourself (after using make install): #include #include "unicode/uclean.h" void main() { UErrorCode status = U_ZERO_ERROR; u_init(&status); if (U_SUCCESS(status)) { printf("everything is OK\n"); } else { printf("error %s opening resource\n", u_errorName(status)); }

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Conversion Engine - Opening  ICU4C uses open/use/close paradigm  Here is a simplified example with a converter: UErrorCode status = U_ZERO_ERROR; UConverter *cnv = ucnv_open(encoding, &status); if(U_FAILURE(status)) { /* process the error situation, die gracefully */ } … /* Use the converter */ /* then call close */ ucnv_close(cnv);  Almost all APIs use UErrorCode for status  Check the error code!

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference What Converters are Available  ucnv_countAvailable() – get the number of available converters  ucnv_getAvailable – get the name of a particular converter  Lot of frameworks allow this examination

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Converting Text Chunk by Chunk  Quick example of using the converter API char buffer[DEFAULT_BUFFER_SIZE]; char *bufP = buffer; int32_t len = ucnv_fromUChars(cnv, bufP, DEFAULT_BUFFER_SIZE, source, sourceLen, &status); if(U_FAILURE(status)) { if(status == U_BUFFER_OVERFLOW_ERROR) { status = U_ZERO_ERROR; bufP = (UChar *)malloc((len + 1) * sizeof(char)); len = ucnv_fromUChars(cnv, bufP, DEFAULT_BUFFER_SIZE, source, sourceLen, &status); } else { /* other error, die gracefully */ } /* do interesting stuff with the converted text */

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Converting Text Character by Character  Works only from code page to Unicode  Less efficient than converting a whole buffer  Doesn’t require managing a target buffer UChar32 result; char *source = start; char *sourceLimit = start + len; while(source < sourceLimit) { result = ucnv_getNextUChar(cnv, &source, sourceLimit, &status); if(U_FAILURE(status)) { /* die gracefully */ } /* do interesting stuff with the converted text */ }

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Converting Text Piece by Piece From a File while((!feof(f)) && ((count=fread(inBuf, 1, BUFFER_SIZE, f)) > 0) ) { source = inBuf; sourceLimit = inBuf + count; do { target = uBuf; targetLimit = uBuf + uBufSize; ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, feof(f)?TRUE:FALSE, /* pass 'flush' when eof */ /* is true (when no more data will come) */ &status); if(status == U_BUFFER_OVERFLOW_ERROR) { // simply ran out of space – we'll reset the // target ptr the next time through the loop. status = U_ZERO_ERROR; } else { // Check other errors here and act appropriately } text.append(uBuf, target-uBuf); count += target-uBuf; } while (source < sourceLimit); // while simply out of space }

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Clean up!  Whatever is opened, needs to be closed  Converters use ucnv_close()  Other C APIs that have an open function also have a close function  Allocated C++ objects require delete

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Introduction  Four types of boundaries: –Character, word, line, sentence  Points to a boundary between two characters  Index of character following the boundary  Use current() to get the boundary  Use first() to set iterator to start of text  Use last() to set iterator to end of text

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Navigation  Use next() to move to next boundary  Use previous() to move to previous boundary  Returns BreakIterator::DONE if can’t move boundary

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Checking a Position  Use isBoundary() to see if position is boundary  Use preceding() to find boundary at or before  Use following() to find boundary at or after

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Opening  Use the factory methods: Locale locale(“th”); // locale to use for break iterators UErrorCode status = U_ZERO_ERROR; BreakIterator *characterIterator = BreakIterator::createCharacterInstance(locale, status); BreakIterator *wordIterator = BreakIterator::createWordInstance(locale, status); BreakIterator *lineIterator = BreakIterator::createLineInstance(locale, status); BreakIterator *sentenceIterator = BreakIterator::createSentenceInstance(locale, status);  Don’t forget to check the status!

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Set the text  We need to tell the iterator what text to use: UnicodeString text; readFile(file, text); wordIterator->setText(text);  Reuse iterators by calling setText() again.

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Counting Words in a File int32_t countWords(BreakIterator *wordIterator, UnicodeString &text) { U_ERROR_CODE status = U_ZERO_ERROR; UnicodeString word; UnicodeSet letters(UnicodeString("[:letter:]"), status); int32_t wordCount = 0; int32_t start = wordIterator->first(); for(int32_t end = wordIterator->next(); end != BreakIterator::DONE; start = end, end = wordIterator->next()) { text->extractBetween(start, end, word); if(letters.containsSome(word)) { wordCount += 1; } return wordCount; }

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Breaking Lines int32_t previousBreak(BreakIterator *breakIterator, UnicodeString &text, int32_t location) { int32_t len = text.length(); while(location < len) { UChar c = text[location]; if(!u_isWhitespace(c) && !u_iscntrl(c)) { break; } location += 1; } return breakIterator->previous(location + 1); }

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Break Iteration - Cleaning Up  Use delete to delete the iterators delete characterIterator; delete wordIterator; delete lineIterator; delete sentenceIterator;

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Using Resource Bundles  Provides a way to separate translatable text from code  Provides an easy way to update and add localizations to your product  Your application must be internationalized before it can be localized  It’s best to encode the files as UTF-8 with a BOM  You can use XLIFF to ICU file format converter tools to make it easier to integrate into an existing translation process  More information about XLIFF can be found at d_ICU.pdf d_ICU.pdf

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Resource Bundle Overview  Locale Based Services –Locale is an identifier, not a container  Resource inheritance: shared resources root en USIE de DECH zh HantHans TWCNTWCN Language Script Country

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Creating a Resource Bundle  Create files like the following: root.txt: root { Aunt { "My Aunt" } table { "on the table" } pen { "pen" } personPlaceThing { "{0}''s {2} is {1}." } } es.txt: es { Aunt { "mi tía" } table { "en la tabla" } pen { "La pluma" } personPlaceThing { "{2} de {0} está {1}." } }

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Building a Resource Bundle  Create a file called pkgdatain.txt with these contents  Execute these commands where the files are located  This results in a myapp.dat archive file being created mkdir myapp genrb –d myapp root.txt genrb –d myapp es.txt pkgdata –m archive –p myapp pkgdatain.txt myapp/es.res myapp/root.res

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Accessing a Resource Bundle  Here is a C++ and C example: UErrorCode status = U_ZERO_ERROR; ResourceBundle resourceBundle("myapp", Locale::getDefault(), status); if(U_FAILURE(status)) { printf("Can't open resource bundle. Error is %s\n", u_errorName(status)); return; } // thing will be “pen” or “La pluma” UnicodeString thing = resourceBundle.getStringEx("pen", status); UErrorCode status = U_ZERO_ERROR; int32_t length; ResourceBundle resourceBundle = ures_open("myapp", NULL, &status); if(U_FAILURE(status)) { printf("Can't open resource bundle. Error is %s\n", u_errorName(status)); return; } // thing will be “pen” or “La pluma” const UChar *thing = ures_getStringByKey(uresresourceBundle, "pen", &length, &status); ures_close(resourceBundle);

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Getting ICU4J  Use a stable release –Easiest – pick a.jar file off download section on –Use the latest version if possible –For sources, download the source.jar  Bleeding edge development –Download from CVS –

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Setting up ICU4J  Check that you have the appropriate JDK version  Try the test code (ICU4J 3.0 or later): import com.ibm.icu.util.ULocale; import com.ibm.icu.util.UResourceBundle; public class TestICU { public static void main(String[] args) { UResourceBundle resourceBundle = UResourceBundle.getBundleInstance(null, ULocale.getDefault()); }  Add ICU’s jar to classpath on command line  Run the test suite

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Building ICU4J  Use ant to build –Ant is available from Apache’s website –Ant can be used to build certain configurations  We also like Eclipse

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Collation Engine  More on collation a little later!  Used for comparing strings  Instantiation: ULocale locale = new ULocale("fr"); Collator coll = Collator.getInstance(locale); // do useful things with the collator  Lives in com.ibm.icu.text.Collator

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference String Comparison  Works fast  You get the result as soon as it is ready  Use when you don’t need to compare same strings many times int compare(String source, String target);

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Sort Keys  Used when multiple comparisons are required  Indexes in data bases  Compare only sort keys generated by the same type of a collator  ICU4J has two classes –CollationKey –RawCollationKey

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference CollationKey class  JDK API compatible  Saves the original string  Compare keys with compareTo() method  Get the bytes with toByteArray() method  We used CollationKey as a key for a TreeMap structure

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference RawCollationKey class  Does not store the original string  Get it by using getRawCollationKey method  Mutable class, can be reused  Simple and lightweight

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Introduction  Assembles a user message from parts  Some parts fixed, some supplied at runtime  Order different for different languages: –English: My Aunt’s pen is on the table. –Spanish: La pluma de mi tía está en la tabla.  Pattern string defines how to assemble parts: –English: {0}''s {2} is {1}. –Spanish: {2} de {0} está {1}.  Get pattern string from resource bundle

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Example UResourceBundle resourceBundle = UResourceBundle.getBundleInstance(“myapp”, ULocale.getDefault()); String person = resourceBundle.getString(“Aunt”); // e.g. “My Aunt” String place = resourceBundle.getString(“table”); // e.g. “on the table” String thing = resourceBundle.getString(“pen”); // e.g. “pen” Object arguments[] = {person, place, thing}; String pattern = resourceBundle.getString(“personPlaceThing”); MessageFormat msgFmt = new MessageFormat(pattern); String message = msgFmt.format(arguments); System.out.println(message);

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Different Data Types String pattern = “On {0, date} at {0, time} there was {1}.”; MessageFormat fmt = new MessageFormat(pattern); Object args[] = {new Date(System.currentTimeMillis()), // 0 “a power failure” // 1 }; System.out.println(fmt.format(args)); On Jul 17, 2004 at 2:15:08 PM there was a power failure.  We can also format other data types, like dates  We do this by adding a format type:  This will output:

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Format Styles String pattern = “On {0, date, full} at {0, time, full} there was {1}.”; MessageFormat fmt = new MessageFormat(pattern); Object args[] = {new Date(System.currentTimeMillis()), // 0 “a power failure” // 1 }; System.out.println(fmt.format(args)); On Saturday, July 17, 2004 at 2:15:08 PM PDT there was a power failure.  This will output:  Add a format style:

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Format Style Details Format TypeFormat StyleSample Output number (none)123, integer123,457 currency$123, percent12% date (none)Jul 17, 2004 short7/17/04 mediumJul 17, 2004 longJuly 17, 2004 fullSaturday, July 17, 2004 time (none)2:15:08 PM short2:15 PM medium2:14:08 PM long2:15:08 PM PDT full2:15:08 PM PDT

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Counting Files  Pattern to display number of files: There are {1, number, integer} files in {0}. String pattern = resourceBundle.getString(“fileCount”); MessageFormat fmt = new MessageFormat(fileCountPattern); String directoryName = … ; Int fileCount = … ; Object args[] = {directoryName, new Integer(fileCount)}; System.out.println(fmt.format(args)); There are 1,234 files in myDirectory.  Code to use the pattern:  This will output messages like:

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Problems Counting Files  If there’s only one file, we get: There are 1 files in myDirectory.  Could fix by testing for special case of one file  But, some languages need other special cases: –Dual forms –Different form for no files –Etc.

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Choice Format  Choice format handles all of this  Use special format element: There {1, choice, 0#are no files| 1#is one file| 1<are {1, number, integer} files} in {0}.  Using this pattern with the same code we get: There are no files in thisDirectory. There is one file in thatDirectory. There are 1,234 files in myDirectory.

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Message Format - Other Details  Format style can be a pattern string –Format type number : use DecimalFormat pattern (e.g. #,#00.00) –Format type date, time : use SimpleDateFormat pattern (e.g. MM/yy)  Quoting in patterns –Enclose special characters in single quotes –Use two consecutive single quotes to represent one The '{' character, the '#' character and the '' character.

IBM Globalization Center of Competency Orlando, Florida, September, th Internationalization and Unicode Conference Useful Links  Homepages  API documents:  User guide: