Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading Chinese pinyin from excel file - problem

807958Oct 25 2010 — edited Oct 27 2010
hello,
I am trying to read a sample Chinese dictionary from an excel file and show it using a table.
When reading the pinyin column, some characters are not read properly, instead they show a ? character.
Below is the excel file as it should be, and the what the Table in Java shows.

The Table
yòng rén jīng fèi
y�ng y�ng zu�

The Excel Data, as it should read
yòng rén jīng fèi
yòng yòng zuò change

It appears that some text is read correctly (as the first row), but some other rows of text are not, apparently at random.
The things that is driving crazy is that even if, in Excel, I copy and paste the yòng from the row above down, it still reads it as y�ng

I am using the expression below to read the content of the excel file.
sheet.getCell(column, row).getContents();

Once again, it works for most of the rows of the spreadsheet, but for a few it doesn't.

Does any one have any idea?
thanks a lot
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2010
Added on Oct 25 2010
5 comments
353 views