File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display Chinese character in CSV

 
Arun Giridhar
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arun Giridhar
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeap your right , just followed This Page to sort it out.

Thank You
 
Arun Giridhar
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I heard that JexcelAPI going to support .xslx format. Is it true ?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic