Forgot your
password?
HOME
FAQS
FORUMS
DOWNLOADS
ARTICLES
PEERSCOPE
LEARN
Search
View:
What's New
Index by Topic
Contributors
Topic List
Printable View
Unanswered Questions
Suggested Path
I18N FAQ Home Page
Manager help
This FAQ is community-managed.
Internationalizing your Java programs is quick and easy. Learn how to tailor your programs for the world market with the standard Java libraries.
What's New
What's a BOM?
Java:API:Internationalization:Encoding
,
Java:API:Internationalization:Unicode
John Zukowski
PREMIUM
, Nov 30, 2005
BOM stands for Byte Order Mark and could be the initial bytes of a UTF-encoded stream, typically used to indicate endianess of the stream. Prior to Java...
How do I find out the default character set for the JVM?
Java:API:Internationalization:Character Sets
,
Java:API:IO:NIO
John Zukowski
PREMIUM
, Jul 31, 2005
Added to JDK 5.0, you can call the defaultCharset() method of the CharSet class, found in the java.nio.charset package. This is apt to depend upon the...
How can I have an XML-based resource bundle?
Java:API:Internationalization:ResourceBundles
John Zukowski
PREMIUM
, Jul 1, 2005
Until JDK 6.0, you can't. Only ListResourceBundles and PropertyResourceBundles are supported. With 6.0, you can create a custom ResourceBundle.Control...
How can I store international / Unicode characters into a cookie?
Java:API:Internationalization
,
Java:API:Servlets:Internationalization and Localization
Sajith Kumar
, Jan 16, 2002
Example: I would like to put this String: "até" The problem is when I get the cookie value I receive "at". ---------------------- One way...
How do I change the default Locale for an applet?
Java:API:Applets
,
Java:API:Internationalization:Locales
John Zukowski
PREMIUM
, Dec 30, 2001
This is no different than for an application or servlet. Just call the setDefault() method of Locale.
What are the considerations for searching text in Java? Are there any tools available?
Java:API:Internationalization
Joe Sam Shirah
PREMIUM
, Nov 29, 2001
Efficient text searching in Java: Finding the right string in any language by Laura Werner provides a good overview, along with code, of I18N and Unicode...
In the article Internationalizing Servlets, the author states the current PropertyResourceBundle class is less efficient in a multithreaded world (like in J2EE/servlets) because it's based on Hashtable,...
Java:API:Internationalization:ResourceBundles
Joe Sam Shirah
PREMIUM
, Nov 29, 2001
Whether the performance hit is worth addressing will depend directly on your site's volume and how often the ResourceBundle elements must be accessed....
How can I obtain the languages spoken in a country? For example, Locale has a private method getLanguagesForCountry, but I can't use it since it's private. Is there another way to obtain the languages...
Java:API:Internationalization
Joe Sam Shirah
PREMIUM
, Nov 20, 2001
This is an interesting question because the answers, none of which may be satisfactory, depend on how the information is to be used. "I want to present...
How can I set a customized currency symbol to be applied to a number? DecimalFormat df = new DecimalFormat(); DecimalFormatSymbols dfs = new DecimalFormatSymbols(); dfs.setCurrencySymbol("Rs"); ...
Java:API:Internationalization:Currencies
Joe Sam Shirah
PREMIUM
, Nov 12, 2001
The biggest misconception here is that DecimalFormat will automatically format to currency values. This is not the case; the basic DecimalFormat will...
How is non-default character encoding specified for an XML document?
Java:API:Internationalization:Character Sets
Joe Sam Shirah
PREMIUM
, Nov 4, 2001
For non-default encoding, the XML text declaration should contain an encoding declaration as in the following examples: <?xml encoding='UTF-8'?&...
What is the default encoding for HTML and XML?
Java:API:Internationalization:Character Sets
,
Java:API:Internationalization:Encoding
Joe Sam Shirah
PREMIUM
, Oct 30, 2001
Through HTML 3.2, the eight bit standard was ISO 8859-1. As of HTML 4.0, the default document character set is Unicode. For XML, the absolute default...
How can I display the current time as GMT?
Java:API:Internationalization:Date/Time
Joe Sam Shirah
PREMIUM
, Oct 30, 2001
Create a custom TimeZone and use it for DateFormat.setTimeZone(). This is discussed briefly in the API documentation and shown in the following code. import...
How do I convert HTML form data from ASCII/HTML representation to a true Java Unicode string? I have a JSP that stores what should be a Unicode stream into a NCLOB. The insert happens fine, however the...
Java:API:Internationalization:Unicode
Joe Sam Shirah
PREMIUM
, Oct 30, 2001
Conversion from HTML escaped numeric entities is straightforward, if not particularly fun. One method that shows the basic concept, while not very efficient,...
How can I internationalize XSLT auto-numbering?
Java:API:Internationalization
,
Java:API:Internationalization:Numbers
Joe Sam Shirah
PREMIUM
, Oct 30, 2001
The xsl:number element provides for auto-numbering. The format attribute and, potentially, the letter-value attribute can be used to internationalize...
What is a char?
Java:Language
,
Java:API:Internationalization
Joe Sam Shirah
PREMIUM
, Oct 17, 2001
While the char type is basic to the Java language, many programmers stumble over Unicode escapes, values and conversions. The first definition should...
How do I convert between ByteBuffer and a CharBuffer using Java 1.4?
Java:API:Internationalization:Character Sets
,
Java:API:IO:NIO
John Zukowski
PREMIUM
, Sep 30, 2001
The java.nio.charset package include character set converters for you. To go from ByteBuffer to CharBuffer, you would do something like the following:...
How many standard time zones exist?
Java:API:Internationalization:Date/Time
Joe Sam Shirah
PREMIUM
, Sep 30, 2001
Actually there are 25. The unexpected "extra" one comes about because there is a time zone for UTC+12 hours and one for UTC-12 hours. The International...
What is the JDBC syntax for using a date literal or variable in a standard Statement?
Java:API:JDBC:Statements
,
Java:API:Internationalization:Date/Time
Joe Sam Shirah
PREMIUM
, Sep 30, 2001
While you are generally advised to use a PreparedStatement and let the driver handle the syntax, the following is the standard form for regular Statem...
How can I use TMX to assist in Internationalization and Localization?
Java:API:Internationalization:ResourceBundles
Joe Sam Shirah
PREMIUM
, Sep 29, 2001
To get some ideas ( here relating to ResourceBundles ), code and other links, see the article Use XML as a Java Localization Solution.
What is TMX?
Java:API:Internationalization
Joe Sam Shirah
PREMIUM
, Sep 29, 2001
TMX stands for Translation Memory eXchange. From the definition at TMX Format - Specifications: "The purpose of the TMX format is to provide a standard...
« previous
beginning
next »
Related Links
I18N Forum
Internationalization home
Sun's Internationalization FAQ
Wish List
Features
About jGuru
Contact Us