Here you can find the source of toAscii(char source)
public static char toAscii(char source)
//package com.java2s; /* Copyright (c) 2014 Karol Stasiak * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. *//*from w w w . j av a 2s .c o m*/ public class Main { private static final String tab00c0 = "AAAAAAACEEEEIIII" + "DNOOOOOxOUUUUYTs" + "aaaaaaaceeeeiiii" + "dnooooo/ouuuuyty" + "AaAaAaCcCcCcCcDd" + "DdEeEeEeEeEeGgGg" + "GgGgHhHhIiIiIiIi" + "IiJjJjKkkLlLlLlL" + "lLlNnNnNnnNnOoOo" + "OoOoRrRrRrSsSsSs" + "SsTtTtTtUuUuUuUu" + "UuUuWwYyYZzZzZzs"; public static char toAscii(char source) { if (source >= 0xc0 && source <= 0x17f) { return tab00c0.charAt(source - 0xc0); } return source; } }