This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Converting to Unicode ?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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");
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic