Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting to Unicode ?

 
Alexander Selling
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using the JExcel API to read an excel file but it doesn't seem to support international characters such as åäö(swedish).

And so my question is how can I convert the current encoding into something that supports swedish ? I read the JExcel API documentation and it says it's supposed to be Unicode by default, I've tried using unicode to utf8 and vice versa conversion methods but it doesn't make any difference.

For example "SÄB" is display as "SƒB".

Thanks in advance!





 
Alexander Selling
Greenhorn
Posts: 16
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay so in case someone else decides to use JExcel(JXL), all you need to do is to convert from 8859_1 to default java like this:
String isoEncoding = new String(cell.getContens().getBytes(),"8859_1");
 
Tim Kaiser
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alexander Selling wrote:Okay so in case someone else decides to use JExcel(JXL), all you need to do is to convert from 8859_1 to default java like this:
String isoEncoding = new String(cell.getContens().getBytes(),"8859_1");


thanks for sharing the solution.
 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Alexander Selling, for both the question and the answer. Reduced a lot of searching for me. Really helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic