aspose file tools*
The moose likes Java in General and the fly likes How to display Chinese character in CSV Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to display Chinese character in CSV " Watch "How to display Chinese character in CSV " New topic
Author

How to display Chinese character in CSV

Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 146

I know this is a common question (Googled over javaranch and other forums but couldn't get the solution) . I'm using JExcelAPI for reading the data from Excel and storing the data in CSV a sample program didn't include much of criteria .
This is my code snippet


On the display i'm getting 汉语/漢語 set of junk values for chinese characters .

Thank you


hate Professionalism
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41472
    
  51
CSV has no provisions for specifying the encoding. Unless the code that handles it is smart about that, chances are that the data is mangled.


Ping & DNS - my free Android networking tools app
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 146

When i tried to open the .csv with Micrsoft Word . I get perfect set of chinese character but i don't see the samething open via EXCEL.I'm reading/writing a set of 15000 Records of chinese character.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Arun Giridhar wrote:When i tried to open the .csv with Micrsoft Word . I get perfect set of chinese character but i don't see the samething open via EXCEL.I'm reading/writing a set of 15000 Records of chinese character.


That suggests that the characters are being stored correctly in the file, and that your Excel is not configured for the proper charset.
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 146

Yeap your right , just followed This Page to sort it out.

Thank You
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 146

I heard that JexcelAPI going to support .xslx format. Is it true ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41472
    
  51
I haven't checked lately, but I've never seen any indication that jExcelApi will handle the XML formats. It seems moribund in general. I'd expect any clues about its status to show up on its website or mailing list.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display Chinese character in CSV