Hi all
Encounter a character encoding issue when i try to retrieve a String column containing Chinese character.
Retrieve a String column on odb file.
em = emf.createEntityManager(); Query query = em.createQuery("SELECT fu FROM FarmUnit fu");
But, when try to print the value out as:
List<FarmUnit> result = db.getFarmUnits(); for (Iterator<FarmUnit> itr = result.iterator(); itr.hasNext();) { System.out.println(itr.next().getName()); // name is a string column }
Result:
å?‹å–„å°?è¾²å?Šå?‹å¥½å» 商
é˜¿æ–‡åˆ†äº«è¾²å ´
æ¢…å·žè¾²å ´
åŠ ç•™æ²™åŸ”è¾²å ´
ç‡•éŠ˜è¾²å ´
美橋阿姨
æº?ç¦¾ç¶ è¾²å ´
è¿´å–„æœ‰æ©Ÿè¾²å ´
�林有機梅園
æ²›èŠ³è¾²å ´
wondering that is there anyway to change the charset of the column? or did i miss anything else?