Java Cookbook
transliterate
Problem:
You want to convert the script text is written in.
Solution:
The Transliterator from icu4j class allows for easy conversion of text from one writing system to another. To transliterate text you simply get an instance of the Transliterator class using the id of the writing system you are converting from, and the id of the system you want to convert into, and then call the transliterate method on the object.
If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.
This site is ad supported. I hope you find something among our sponsors worth clicking. ;)
i18n search
Custom Search