This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How to export the chinese character to excel using ExcelCSVPrinter. Open the file within browser

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Our application using in English, German, Franch and chinese.
String chineseCharacter=""; // chineseCharacter like 長长牀床東东彿佛. This chinese data coming from oracle database..
when i using,
responses.setContentType("text/html; charset=UTF-8");
It works fine for German , French and Chinese. (So There is no issue in Stream and Retrieval from database)

But when i using the following only i get junk values like 長长牀床東东彿佛. We using the windows Xp browser is IE , mozila and safari. Service pack 3

My code

--------------------------------------------------------------------------------


After export the data to excel show the result for 長长牀床東东彿佛. But not show the original result 長长牀床東东彿佛

I use the following stmt
responses.setContentType("text/html charset=UTF-8");
Its shows the correct result for chinese character.

I use the below statement
responses.setContentType("application/download; charset=UTF-8");
or
responses.setContentType("application/vnd.ms-excelset;charset=UTF-8");
or
responses.setContentType("application/vnd.ms-excel;charset=UTF-8");

The out put show the in the excel sheet 長长牀床東东彿佛 or some other jung characters.
What can i do here?. After export,I want to show the original chinese character in the excel sheet using the ExcelCSVPrinter.

Thanks & Regards
Thendral
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CarefullyChooseOneForum while posting.
This is not a distributed java question. Moving to "Other opensource project"
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you set the encoding on the ExcelCSVPrinter?
 
Oh. Hi guys! Look at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic