简体   繁体   中英

Print Unicode character in Apache Poi

I'm using Apache Poi to READ Excel file. In my excel file has a row with string value : "ありがとう"

I use this method to print value :

cell.getStringCellValue()

The result : "?????"

I try to use method :

new String(cell.getStringCellValue().getBytes("iso-8859-1"), "UTF-8")

The same result appear.

Do anyone how to solve this problem, please to help me ?

Thank all.

because your console not support the charset this string represent. in Windows, change the console to utf8 page by chcp 65001

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM