You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by sgomatam <sa...@yahoo.com> on 2011/07/11 11:38:54 UTC

Not displaying chinese characters.

Hi,

I have data (chinese) encoded into UTF-8 using URLEncoder.encode mehtod and
saved in mysql databaset table.  I am trying to create an excel with the
data from database.  Before setting the value to sell, I am decoding it
using URLDecoder.decode method.  When I open the excel file, it is not
showing the chinese characters.

For example :

Encoded column value in database is 
17%E5%AF%B8%E6%95%B0%E5%AD%97%E6%B6%B2%E6%99%B6%E6%98%BE%E7%A4%BA%E5%99%A8

Expected Decoded Value in Excel
17寸数字液晶显示器

But showing the value in Excel as
17øpW²v>:h

I have few files with data in chinese and when I open them, those show up
the data properly.  

Thanks,
sgomatam.


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Not-displaying-chinese-characters-tp4574445p4574445.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Not displaying chinese characters.

Posted by sgomatam <sa...@yahoo.com>.
Actually, the problem was that POI-2.5.1  is not supporting the utf-8.  Now,
I am using POI-3.7 and is working fine.  It is displaying the decoded string
pass to the cell in chinese as expected.  Thanks for the reply.

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Not-displaying-chinese-characters-tp4574445p4585256.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Not displaying chinese characters.

Posted by Nick Burch <ni...@alfresco.com>.
On Mon, 11 Jul 2011, sgomatam wrote:
> I have data (chinese) encoded into UTF-8 using URLEncoder.encode mehtod 
> and saved in mysql databaset table.  I am trying to create an excel with 
> the data from database.  Before setting the value to sell, I am decoding 
> it using URLDecoder.decode method.

I don't think that's correct. You need a real Java string to pass into 
POI. I suspect that if you print your string out, it'll be wrong. You need 
to get the correct String in Java before you touch POI.

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org