Here you can find the source of Unicode2ASCII(String unicode)
public static String Unicode2ASCII(String unicode)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w .j a va2s . co m * Creates a new instance of ThaiUtil */ public static String Unicode2ASCII(String unicode) { StringBuffer ascii = new StringBuffer(unicode); int code; for (int i = 0; i < unicode.length(); i++) { code = (int) unicode.charAt(i); if ((0xE01 <= code) && (code <= 0xE5B)) { ascii.setCharAt(i, (char) (code - 0xD60)); } } return ascii.toString(); } }