I18N Section Index | Page 4
How do we know which charset the OS is using? For example, I know that Japanese Windows 95 encoding is MS932, but how do we know which charset it uses?
There is an undocumented system property ("file.encoding" I think) which gives the name of the default encoding. A better way is to create an OutputStreamWriter without specifiying the e...more
You may want to look at the international standard for telephone numbering. This is the ITU (International Telecommunication Union) publication no. E.164, The international public telecommunicatio...more
ASCII is a subset of Unicode, although it is almost the other way around: the Unicode Standard team intentionally chose to assign the first 256 Unicode characters to match Latin-1. The first 128...more
The Java I18N way is to use a DateFormat. While SimpleDateFormat, which is generally returned, creates a large number of objects, it is locale aware and will handle most of your needs. The follo...more
// get Calendar with current date java.util.GregorianCalendar gCal = new GregorianCalendar(); // get yesterday's date gCal.add( Calendar.DATE, -1 ); // get components ...more
Calendar.roll changes a specific unit and leaves 'larger' ( in terms of time - month is 'larger' than day) units unchanged. The API example is that given a date of August 31, 1999, rolling by (Ca...more
The data is already in Unicode when it arrives in your program. Conversion from and to the encoding/charset/CCSID in the database from/to Unicode in the program is part of the JDBC driver's job. ...more
It was Sun's JDK 1.1.7B.
Try the World Telephone Numbering Guide site. Hope this helps.
The J2ME CLDC specification describes which internationalization (I18N) and localization (L10N) features are required of CLDC based devices, which features are left to profiles (such as the Mobil...more
Pass the locale to the DateFormatSymbols constructor and ask for the list of month symbols: Locale locale = new Locale("es", "ES"); DateFormatSymbols symbols = new DateForm...more
Pass the locale to the DateFormatSymbols constructor and ask for the list of weekday names: Locale locale = new Locale("es", "ES"); DateFormatSymbols symbols = new DateForm...more
I have downloaded TTF fonts, in my case for tamil. What should I do in order to view the font in my Java application?
When you say "view the font" I assume you mean "activate or use the font." If you are using JDK 1.2 or later, you have two options for using the font: Use its name directly i...more
I use a servlet to export WML on the Nokia Toolkit. Why can't I output a Chinese String (GB2313 or UNICODE)?
The WAP protocol gaurantees only 7-bit ASCII, which limits you to the most basic character sets. Most 'phones will support 8-bit ASCII. AFAIK none support Unicode.
If my servlet or JSP contains international characters (like "Ýðüö"), how do I ensure they are displayed correctly?
The simplest way is to write your JSP (or strings in your servlet) to use the HTML entity escape characters for Unicode. For instance, the string "Ýðüö" would be rep...more