SQLite 데이터베이스의 데이터로 채워지는 listView가 있습니다. 내 필드 중 하나는 전체 원 : \ u25cf 또는 열린 원 : \ u25cb의 유니 코드 문자가있는 표식입니다. 텍스트 필드에 하드 코딩 된 문자열을 사용하면 두 문자가 모두 올바르게 표시됩니다. 그러나, 내 listView 문자 대신 문자 인코딩을보고 있습니다.SQLite 데이터베이스에서 유니 코드 문자 표시
왜이 사람이 ... 그리고 유니 코드 문자를 표시하는 방법을 알고 있습니까?
감사합니다.
업데이트 :
삽입 코드 리소스가 하나 개의 라인은 예를 들어 인으로 CSV 파일로 되
private void loadRecords() throws IOException {
final Resources resources = mContext.getResources();
InputStream inputStream = resources.openRawResource(R.raw.records);
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
try {
String line;
while ((line = reader.readLine()) != null) {
String[] strings = TextUtils.split(line, ",");
if (strings.length <2) continue;
long id = addRecord(strings[0].trim(),strings[1].trim(),strings[2].trim(),strings[3].trim(),
strings[4].trim(),strings[5].trim(),strings[6].trim());
}
} finally {
reader.close();
}
}
이다
primaryKey,name,surname,address,phone,email,\u25CB
데이터베이스에 제대로 삽입하지 않았으므로 – njzk2
"캐릭터 대신 텍스트 인코딩을보고있는 중"이라는 것은 무엇을 의미합니까? 얼마나 정확하게 표시됩니까? –
lisView의 요소가 열린 원을 표시하는 대신 "\ u25CB"로 표시된다는 의미입니다. – user1791710