소스의 일부분입니다.
텍스트 파일을 불러와서 띄울때 한글이 깨져서 나옵니다.
어느부분을 어떻게 고쳐야 한글이 나올는지 궁굼합니다.
private void initDB(){
//this.readOutput = (TextView) this.findViewById(R.id.readOutput);
FileInputStream fis = null;
try {
fis = this.openFileInput("words_utf_18.txt");
if(fis!=null){
BufferedReader reader =new BufferedReader( new InputStreamReader(fis));
String strLine;
String[] arrWord;
while((strLine = reader.readLine()) != null)
{
Log.i(TAG, "TEXT - " + strLine );
arrWord = strLine.split(",");
String word = arrWord[0];
String desc = arrWord[1];
Log.i(TAG, "WORD - " + arrWord[0] + " || DESC - " + desc + " || TYPE - " + arrWord[2]);
String type = arrWord[2];
//long rowID = db_adapter.insertRow(arrWord[0], arrWord[1], arrWord[2]);
long rowID = db_adapter.insertRow(word, desc, type);
Log.i(TAG, "rowID - " + rowID);
}
}
}catch (IOException e) {
Log.e("ReadFile", e.getMessage(), e);
} finally {
if (fis != null) {
try {
fis.close();
} catch(IOException e) {
}
}
}
}
BufferedReader reader =new BufferedReader( new InputStreamReader(fis), "EUC-KR");
이걸
BufferedReader reader =new BufferedReader( new InputStreamReader(fis), "이부분에 캐릭터셋을 지정해야 할것 같습니다.");