俄语不支持android

时间:2014-03-28 06:28:55

标签: android localization

我有俄语数据,想要显示它,但屏幕上会显示奇怪的符号。

以下是我的代码:

public ArrayList<String> ReadFromfile(String fileName, Context context, boolean isArabic) {
    ArrayList<String> temparray = new ArrayList<String>();
    AssetManager assestManager = context.getAssets();
    InputStream input;
    BufferedReader bufferReader;
    try {
        input = assestManager.open(fileName);
        if (isArabic)
            bufferReader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
        else
       //bufferReader = new BufferedReader(new InputStreamReader(input, "windows-1252"));
        bufferReader = new BufferedReader(new InputStreamReader(input, "\u041a\u043e\u0440\u0430\u043b\u044c"));

        String line;
        while ((line = bufferReader.readLine()) != null) {
            temparray.add(line);
        }
        bufferReader.close();
    } catch (Exception e) {
        Log.e(TAG, "Error: " + e.toString());
    }
    return temparray;

}

如何显示Russain语言数据???

0 个答案:

没有答案