File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Character Encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Character Encoding" Watch "Character Encoding" New topic
Author

Character Encoding

Neha Deshmukh
Ranch Hand

Joined: Apr 04, 2007
Posts: 30
What is the difference between UTF-8 and Unicode character encoding?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Have a read of this.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Neha Deshmukh
Ranch Hand

Joined: Apr 04, 2007
Posts: 30
Hey Thanks alot for this useful article.
Now I have one doubt.
I am exporting french characters from jsp to excel file with charset UTF-8.
response.setContentType("application/x-msexcel);
but in excel file it is showing block for some characters.
when I write
response.setContentType("application/x-msexcel;charset=Unicode"); all characters are displayed perfectly in excel file.
So can you please explain this behaviour? I mean why it is not working for UTF-8 encoding and working properly for Unicode encoding.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
The encoding is the same in both cases (UTF-8). The difference is that Excel by default does not seem to recognize Unicode, and only if it is explicitly told that it's being given Unicode data will it do the right thing.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Character Encoding
 
Similar Threads
Java Print
junk values written into a file when column values taken from the database table..
Problem I18N with JSF
URL Encode
Special Character Issues in Java with Sybase