/* * @(#)LangDriver_ru.java 0.52 2002/10/24 * * Copyright (c) 2002 ALOV * * mailto: feedback@alov.org * * This file may be copied, modified and distributed only in * accordance with the terms contained in the accompanying * file LICENSE.TXT. */ package org.alov.addon; import org.alov.util.LangDriver; /** *
Performs reading from Cyrillic ASCII string to unicode
* * @author Leonid Vasilenko, Artem Osmakov * @version 0.52, 2002/10/24 */ public class LangDriver_ru implements LangDriver { public String read2Unicode(String s){ StringBuffer unicode = new StringBuffer(s); int code; for(int i = 0; i < s.length(); i++) { code = (int)s.charAt(i); if ((0xb1 <= code) && (code <= 0xff)){ unicode.setCharAt( i, (char)(code + 0x350)); } } return unicode.toString(); } }