Hi Birendar, As I told you before, I do not have any experience of using exotic character sets. Here are my best guesses however:
1. You should *not* be setting encoding when reading a file. Setting encoding will be the task of the application that created the file (in your case MS Excel). So remove following line from your code: cell.setEncoding(HSSFCell.ENCODING_COMPRESSED_UNICODE); 2. Print on console cell.getEncoding(). It would come 0 or 1. I think you should get 1 here. 3. Try printing the character on console right after you have read it from HSSFCell. What do you get at this point? For a comparison print hard coded characters Š, š, Ž, ž Looking at the archives, I would guess that encoding of source excel file would be set depending on the default encoding on the system where file was created. I hope someone with more experience with encoding and poi would be able to give you better pointers Regards, Tahir _____ From: Birendar Waldiya [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 2:56 PM To: [EMAIL PROTECTED]; [email protected] Subject: Major Problem With POI Excel reader: Urgent Help Needed Hi Tahir, Thank you for your response in regards to the problem I have posted to forum, The details of probelms are as foollow : I am trying to read data from - 1. Text File : Using a text file parser that reads data from FileStreamReader 2. XLS file : This reads the data from InputStream loade to the POIFSFileSystem When using text uplaod : this workign very fine and no problem with the characetr mentioned Š, š, Ž, ž they go file and look fine in database, But when I am using the xls uplaod the aboce characters does not get dispaled correctly. I have tried to chage the cell encoding , tried to chage the string by String.getBytes("encoding") , tried to save xls file as UNICODE, UTF-8, Defualt ISO and all short of things i can thing but thease characetr doent get reflected into datase correctly. What can be done for getting charcters correctly?, My FRD is full of mention of thease charactrer they are not at all bother abot other characetr and they will test onlt tease characetr . Attaching the code that reads data from xls file Your help and guidance will be of great use for me Thanks a lot agian , leaset you replied . regards Birendar S Waldiya Birendar, I think you would have to share some more information, perhaps a code snippet if you expect any help from the forum. Try to explain your problem in more detail. Latest "release" of poi can be downloaded from poi website which is 2.5.1. You can also get the latest development version from the dev directory. Both release and development versions are available in source and binary forms. Your problems seems to be related to handling of encoding. But I do not have anything to say about it :). Regards, Tahir Akhtar -----Original Message----- From: [EMAIL PROTECTED] [HYPERLINK "mailto:[EMAIL PROTECTED]"mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 3:10 PM To: POI Users List Subject: Major Problem With POI Excel reader: Urgent Help Needed Hi , I am using POI API for reading data from an excel file , which is advance version of the API that read data from text file, to increase the character bandwidth ie to support special charater . However the POI api are not reading special character properly. On unix they behave differently and on windows they behave dirrerently. However my text file parser is supporting more special character them my excel reader. I am facing problem with the character "Š, š, Ž, ž" whcih are read well and inserted into databse well. But in poi apis it fail to read them properly. On windows they are read different them unix. If any one has ever face such problem please help me, I have posting my probwelm to this forum frequently for last few days but this seems to be dead forum. Can anyone tell me from where exactly I can get the POI jar latest and what is the lates version of it ? The site is so old . Please help Thanks Regards Birenadr S Waldiya =====-----=====-----===== -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 5/5/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 5/5/2006
