This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes sql to excel with java character problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

sql to excel with java character problem.

Doug Douglas

Joined: Aug 04, 2011
Posts: 2
Non-English Values are looking like upside with their charsets.

"application/; charset=cp1254";

Values on Excel is : ??? ??? ??? ??? ???

"application/; charset=UTF-8";

Values on Excel is : ÊÖÇÑÈ ÊæŞÚÇÊ ÔåÑ ÃßÊæÈÑ İí ÓæŞ ÇáÜPP

If I open excel and import it with utf-8,values looks great,but everytime opening file with importing is problem for customers. I found this code below written with ASP.NET,but couldnt write with JAVA. Also I am not sure this code will solve my problem.
Response.ContentEncoding = System.Text.Encoding.Default;
Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146


try the example int this thread.

Hope this helps.

The important thing is not to stop questioning.Curiosity has its own reason for existing.
It is sorta covered in the JavaRanch Style Guide.
subject: sql to excel with java character problem.
Similar Threads
Opening Excel sheet in a browser
How to export the chinese character to excel using ExcelCSVPrinter. Open the file within browser
How to output JSP page to Excel ?
display of japanese characters in excel sheet
Exporting HTML Data to excel issue