Unable to read french characters

Im trying to reach data from an excel (using the Apache software's excel reader code) but my java code is not recognizing words like "D�cor". It is replacing '�' with '?'(All my columns are in English , it is just a couple of data entires like D�cor or caf� that bother me) . I use FileInputStream to read data-i cannot change that as it is required input for apache excel file reader. I thought java uses Unicode by default, but when i printed
(new OutputStreamWriter(new ByteArrayOutputStream())).getEncoding()
i got 'ASCII' as output. Could anyone help me out with this please?
-Aarthi

Just to add to it: this is the code I'm using
FileInputStream fis = new FileInputStream(fileName);
Workbook wb = new Workbook(fis);
Sheet sh = wb.getSheetAt(0);
Row row =null;
String strDesc = null;
for (int i = (firstRow + 1); i < lastRow; i++)
row = sh.getRow(i);                
// line below is unable to read D�cor
strDesc = row.getCell((short) col1).getStringCellValue();
System.out.println("Desc -> "      +strDesc );
}

Similar Messages

  • Tomcat unable to read accented characters from MySQL

    Folks,
    Can anyone help with me this problem?
    It seems that my version of Tomcat is unable to read accented characters from my MySQL Database.
    I've checked in the Database and the characters are all correctly represented there. But when, in my servlet code, I do:
    String author = results.getString("author_surname");If the String contains any accented character then the character shows as a '?'. (Even before it gets to the JSP - I'm writing the results straight to catalina.out).
    Looking around these forums I found that some people suggested adding
    ?useUnicode=TRUE&characterEncoding=UTF-8;to the end of my jdbc url. As in:
    <ResourceParams name="jdbc/connection">
    //a whole load of other params
      <parameter>
        <name>url</name>
         <value>jdbc:mysql://localhost:3306/bookshop?useUnicode=TRUE&characterEncoding=UTF-8</value>
      </parameter>
    </ResourceParams>inside my server.xml
    But it doesn't seem to make any difference. In addition, I doubt I even need to use Unicode as the accents I need are only: ����� etc.
    (Incidentally, writing that line into my server.xml, tomcat complains that it should finish with a semi-colon. Is that correct? Even if I put in the semi-colon, it still complains!!)
    Any suggestions on this would be much appreciated. Thank you.

    user13109986 wrote:
    HI,
    From http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/ch9.htm
    My understanding is the JDBC Api converts the string from the database to UTF-16.. If so is there any way to disable the UTF-16 encoding at JDBC API?That's exactly what it's supposed to do. There isn't even any concept of what it would mean to disable that: Java characters are UTF-16 representations of Unicode code-points, so there isn't anything else it could do.
    I still suspect the JDBC part is working correctly and your writing-to-file isn't. I found this quote in the Wikipedia article on Windows-1256:
    Windows-1256 is a code page used to write Arabic (and possibly some other languages that use Arabic script, like Persian) under Microsoft Windows. This code page is not compatible with ISO 8859-6 and MacArabic encodings.So was there a particular reason you chose Cp1256 and not ISO-8859-6 as the charset to write to the file with?

  • PDS - XML format, unable to read special characters in a string.

    Hi All,
    I've been using XML files to create my report with Oracle9i's new featue of PDS.
    Now, I'm unable to read a file if it contains '&' or '<' in the string. In fact, the xml file itself not able to crate a xml page in the browser, if these special characters are present.
    Is there any way to solve this problem ?
    I can't tell the users to remove &, < from the description data. Is there any way to workaround for this ?
    Thanks in advance,
    Satya.

    Hi Rohit and Rajesh
    Thanks for your reply.
    In fact, my problem is like this:
    I'll get data in .txt file and save that as a .xml file in the network before calling Oracle report ,which gets data from the .xml.
    The contents are like this:
    <Comapy name> Ford Motors UK & Europe</Company name>
    <Department> HR & Pensions</Depatrment>
    <Salary>Grad4 < 25000 </Salary>
    As per XML entity character representation, I need to replace '&' with '&amp;' and '<' with '<lt;'
    I'm wondering is there any other way to solve this problem as it is difficult to replace '<' and '>' generically.
    Honestly, I couldn't understand what Mr. Rajesh was trying to tell.
    'for & use & ( with semicolon at the end)'
    'for < use <'
    'for > use >'
    Can you shed some light on this ?
    Many thanks
    Satya.

  • Unable to read chinese characters in a flat file to external table

    Hi All,
    We have a flat file containing data in chinese. We are using external table to read data in files. When i do select <coulmn-name> from <table> it displays box for the chinese characters. The column is of type varchar2.
    The NLS_LANGUAGE is AMERICAN and NLS_CHARACTERSET is AL32UTF8.
    The character set is mentioed as UTF8 in external table defnition.
    Is the external table not reading these charcters properly? Should any patch be installed or some settings should be changed for sql developer to to display chinese character?

    The NLS_LANG environment variable/registry string variable (You are just one of the 1000s of 'anonymous' users refusing to post platform and version), so NOT NLS_LANGUAGE, on the server hosting the file, should be set to anything ending in .AL32UTF8
    Sybrand Bakker
    Senior Oracle DBA

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

  • French characters in run time parameter values doesn't show up in emails

    We have a custom workflow with configurations to send email when a request is assigned to a person and also to send email on request rejections.
    We are encountering following issues with respect to French characters that are available in the message body and message subject.
    Issue 1:Notifications are configured in Human Task (ApprovalTask.task) when a task is assigned. Since the message body contains French characters we have used ISO-8859-1 encodings to render the message properly to the user. The message body also has some run time content from the task payload.
    For e.g. &#192; titre de responsable fonctionnel, une demande d''approbation pour un acc&#232;s informatique vous est assign&#233;e.
    Acc&#232;s informatique demand&#233; : <%/task:task/task:payload/ns1:ObjectDetails/ns1:name%>
    In this case all static text values are rendered properly to the end user in his email. However the French characters in run time parameter values doesn't show up properly and has some weird characters.
    Issue 2: Unable to change the default subject shown in the approval task emails i.e. Notifications are configured in Human Task (ApprovalTask.task) when a task is assigned. By default it shows Action Required: Approval. How can this default value be changed?
    Issue 3: We have an Email Activity in Bpel process that follows a task rejection. The emailpayload is ISO-8859-1 encoded and works for the message body. However the email subject shows up with ISO-8859-1 encodings itself and doesn't convert to proper string in the end user's email. Is there any specific setting required for french characters in subject?

    Hi Kulwinder,
    Thanks for your reply.
    In fact I do, I've follewed the "Using SAP HANA Variables with SAP BusinessObjects BI4.0" guide.
    Please note, when I use a fix value to parameter is working fine, for example:
    SELECT *
    FROM "_SYS_BIC"."prueba-concepto/CV_TEST_VAR_II" ('PLACEHOLDER' = ('$$FECHA$$','20130530'))
    But when I set prompt of the DataFoundation parameter I get and error, this is my sentence:
    SELECT *
    FROM "_SYS_BIC"."prueba-concepto/CV_TEST_VAR_II" ('PLACEHOLDER' = ('$$FECHA$$',@Prompt(FECHA)))
    To me is very curious that I can't enter a value in the DataPreview in Hana Studio, because is not requested, even when the input parameter have been set as mandatory
    Have you idea of what could be happening?

  • 8859-1  PDF does not show french characters.

    Hi All,
    I am stuck in this issue for 2 days now and finally i decided to post it here.
    I have created a custom oracle report(10G) with BI to open in PDF. The XML prolog Value is defined as <?xml version="1.0" encoding="iso-8859-15"?>
    Now when i run the report in R12 the pdf file shows junk character for french characters(É shown as "%o"). These characters are displayed properly if i look at the XML file. When we run that output from the server we get the weird characters but if we take the same output (XML) file and run it locally using desktop publisher the PDF document shows the French characters
    I check the nls_characterset and it is defined as AL32UTF8(which supports french)
    I read some articles they advise to copy fonts from *$FND_TOP/resource* to *$OA_JRE_TOP* and *$AF_JRE_TOP(lib/fonts)* , but it does no work.
    Also, one of the article says to add files in $JAVA_HOME. But i was not able to find JAVA_HOME and the dba says we have $JAVA_TOP and we are not suppose to change anything here.
    we are using EBS R12.1.3
    oracle reports : 10.1.2.0.2
    Any help on this will be appreciated.
    Regards,
    K

    I believe your only option is to setup Pasta
    How to Setup Pasta Quickly and Effectively [ID 356501.1]
    How to Generate PDF Output With UTF8 in R12? [ID 778970.1]
    HTH
    Srini

  • Music Downloads - unable to read or write to disk.

    Hi, I'm new to iPods, and when I try to download music
    I get the message Unable to update iPod, unable to read / write to disk....
    Originally I had no problems now unable to download more than one song at a time, and only the manually... it's taking ages...
    Does anyone have any ideas? I've restored, reset everything and downloaded the latest software....

    Hi,
    Unless you are using OCR (optical character recognition) software when doing the scan, the result of scanning a document is only an image, a picture of the document. Since you only have a picture of the document at this point, the only thing that you can do with it in Word is to insert the image into the document. As an image, you won't be able to edit or search the text that appears in the image. You need to run OCR software to examine the image and convert the images of the characters into editable text. If you are already using OCR software, reply back and let me know which application you are using, and I'll try to help you further.
    Hope this helps,
    Ken

  • Unable to read multiple files in BODS

    hi all,
    i am unable to read multiple files [with same format of fields] using wild card characters in file name.
    scenario:
    i have 2 files: test1.xlsx & test2.xlsx
    in the excel file format, for the file name column, i have given test*.xlsx.
    and done the direct mapping to target column.
    but when i run the job i am getting below error.
    at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.ReadAllRows(MSExcelAdapterReadTable.java:1242)
    at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.readNext(MSExcelAdapterReadTable.java:1285)
    at com.acta.adapter.sdk.StreamListener.handleBrokerMessage(StreamListener.java:151)
    at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:448)
    at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
    at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1600)
    at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)
    please let me know if there is any solution to this.
    regards,
    Swetha

    Hi,
    i just copied a xlsx file with 3 different names (Test_Data.xlsx, Test_1.xlsx, Test_2.xlsx) and tried with below options and it worked for me.
    Note: I tried on the same OS and DS 4.1 SP2(14.1.2.378)versions. In Linux File names are case sensitive.

  • Special French characters not displaying properly

    Hi:
    I am using Weblogic 9.2, struts 1.2, JDOM,and ejb.
    I read special characters from the properties files using struts but when I assigned it to xml tags(JDOM elements) it is not showing properly in the xml tags.
              Element header = new Element("header");
              while(elementListItor.hasNext())
                   Element child = (Element)elementListItor.next();
                   String name = child.getName();
                   header.addContent(new Element(name).setText("Montant pay?", name)));
                   i++;
    Yours,
    Desperate.

    Hello,
    If you are displaying the report output as a PDF output then you need to make sure that:
    -NLS_LANG is set to French
    -the fonts used in the report are installed on the PC
    -the characters are stored correctly in the database
    -PDF subset is configured
    How to Use Font Subsetting in Reports for PDF Output (Doc ID 207711.1)
    Regards,
    Alex

  • Insert french characters into the database

    Hi,
    My user requirement is to insert french characters into the db. However he has set as per my suggestion of altering session alter session set nls_language='french' he can't insert french characters. Is this using alter session helps to retrieve only the outputs in french language or to insert too?
    Please help.
    Version : oracle 8i
    nls_parameters at database level:
    SQL> select * from nls_database_parameters;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET US7ASCII
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_NCHAR_CHARACTERSET US7ASCII
    NLS_RDBMS_VERSION 8.1.7.0.0

    Your database character set is US7ASCII : you can only insert ASCII characters which is OK for most French characters but not all. This cannot work for:
    àéèùçChanging NLS_LANGUAGE won't help. You need to change database character set to WE8MSWIN1252 for example. This should be easy in your case because US7ASCII is a binary subset of many others characters set. Please read http://docs.oracle.com/cd/A87860_01/doc/server.817/a76966/ch3.htm#47136

  • Problem with French characters with updateContent

    I have this problem with Spry, (had it also with YUI a few
    months ago) with special french characters
    (éèçàù). I use encoding UTF-8, but
    iso-8859-1 isn't working either. I put some examples here:
    http://www.eventsonholiday.com/test_loadurl.asp
    As long as it is static content, no problem. But when I get
    content from a recordset from an Access database: trouble.
    In IE7 the french characters are even worse, and I get the
    error: null is empty or not an object

    I think I found a solution. I found a few resources on the
    internet that said: xmlhttprequest always sends data as utf-8 by
    default. So when all the other pages use iso-8859-1, there's a
    problem. It can be solved this way: when retrieving recordset
    fields from ASP I use
    HTMLEncoding like this:
    <%=Server.HTMLEncode(RSevents.Fields.Item("event_location").Value)%>.
    I have to do this for each field in the page, what means some extra
    work.
    For PHP it should be done with
    htmlentities
    If anyone has a solution without using the Server.HTMLEncode
    method, tell me...

  • How to encode a fileHandler to output french characters ?

    Hi everyone,
    I'm trying to encode a fileHandler to create a file that contains french special characters (è, é, . . . .).
    I tried the following code:
    fileHandler.setEncoding("ISO-8859-1");
    and the following
    fileHandler.setEncoding("UTF-8");
    But still the output returns a question mark instead of the é and a square instead of the é respectively.
    Can anyone advice how to encode the fileHandler to have french characters in the output file ?
    Thanks
    Lanlani

    Lanlani wrote:
    But still the output returns a question mark instead of the é and a square instead of the é respectively.And how are you determining that? Bear in mind that the tool you use for looking at the output may also have charset encoding problems.

  • Parse exception with french characters

    My parsing program throws a SaxParseException upon the parse of some french characters; in particular a "�" character. These characters are enclosed in a CDATA tag, so I'm not sure why its being parsed. My file is encoded in UTF-8. How can resolve this problem? Thanks
    org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
         at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
         at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
         at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)

    Your file is not encoded in UTF-8, although the XML
    prolog claims it is.Meaning the sender/creator of the file is at fault?
    If not UTF-8, then probably ISO-8859-1, correct?Most likely the creator of the file is at fault. But it's possible that it has been through some transformation between them and you that rewrote it in a new charset.
    Sure, the real encoding could be ISO-8859-1. Or it could be windows-1252. Other encodings are possible but unlikely, I suppose.

  • French characters fail to display properly (have tried all the regular fixes)

    I am updating a website with french characters and they are not displaying correctly. This website has been live for a long time and had no problems, but while updating some wording/punctuation on the development (before rolling it into live), I am seeing that my characters are failing. We recently bought CF Builder 2 and I believe this to be the problem, as I had something similar happen like this - but with an email blast - a while ago (I ended up having another worker develop the code on his PC with a different program).
    I have googled this and have ensured the following settings are correct:
    window-->preferences-->workspace--->text-file encoding: UTF-8
    project-->properties-->general-->text-file encoding: UTF-8
    I've also tried putting
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" >
    at the top of my pages and they still display incorrect characters when french accents are used.
    Any ideas?
    Thanks,
    Cameron

    http://www.virtualhelp.me/applications/51-office/288-firefox-4-doesnt-save-tabs#yvComment288
    this should solve some of your problem if it is because you got the '''newer''' version!!

Maybe you are looking for