UTF8 encoding and applyXSL

Hi,
I have following problem: sometime ago I used applyXSL to make XSLT transformation and get result in UTF-8. Then I send it to server using UTF8.
But after new release of Acrobat 9 and fix in Acrobat 8 (8.1.3) ApplyXSL function returns result in current system encoding.
So my question is: how to convert encoding in JavaScript or how to get current host encoding?
Thanks for help

I solve it. If someone need solution please visit:
http://patysie.com/wordpress/

Similar Messages

  • Node doesn't belong to the current document and Invalid UTF8 encoding errors

    Hi
    I'm creating a XSQL page that calls a PL/SQL procedure:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <page xmlns:xsql="urn:oracle-xsql" connection="sgvrt">
    <xsql:include-owa>xml_indicadores_epm;</xsql:include-owa>
    </page>
    When I run the page I get:
    Node doesn't belong to the current document.
    if I use "<include-xml>" I get the following error:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <page>
    <xsql-error action="xsql:include-xml">
    <message>Invalid UTF8 encoding.</message>
    </xsql-error>
    </page>
    The XML page generated is well formed and it sends "test/xml; charset="ISO-8859-1" myme type. I test it in IE and it runs fine. I wrote a simple procedure that generates a simple one tag XML file and I still get the same errors.

    Thanks for the reply
    We've tried using the encoding attribute (encoding="ISO-8859-1") but it generates the same errors. We're using XSQL that comes with 9iAS 1.0.2.2.2a. We also tried with XSQL that comes with Oracle 9.2.0. It seems that the parser is not detecting if the XML document has a different encoding than UTF8.

  • Node doesn't belong to the current document and Invalid UTF8 encoding.

    Hi
    I'm creating a XSQL page that calls a PL/SQL procedure:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <page xmlns:xsql="urn:oracle-xsql" connection="sgvrt">
    <xsql:include-owa>xml_indicadores_epm;</xsql:include-owa>
    </page>
    When I run the page I get:
    Node doesn't belong to the current document.
    if I use "<include-xml>" I get the following error:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <page>
    <xsql-error action="xsql:include-xml">
    <message>Invalid UTF8 encoding.</message>
    </xsql-error>
    </page>
    The XML page generated is well formed and it sends "test/xml; charset="ISO-8859-1" myme type. I test it in IE and it runs fine. I wrote a simple procedure that generates a simple one tag XML file and I still get the same errors.
    The page generated by the PL/SQL procedure is:
    <indicadores_gestion_epm>
    <fecha>Junio 2001</fecha>
    <indicador><descripcion>Costo de Generacisn de Potencial por Perforacisn (Conv.)</descripcion><plan_valor>N/D</plan_valor><real_valor>48,21</real_valor><unidad_medida>M$/Bl</unidad_medida></indicador>
    <indicador><descripcion>Costo de Generacisn de Potencial por Perforacisn (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>0</real_valor><unidad_medida>M$/Bl</unidad_medida></indicador>
    <indicador><descripcion>Costo de Exploracion Aqo Actual (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>22,48</real_valor><unidad_medida>$/BPE</unidad_medida></indicador>
    <indicador><descripcion>Costo de Exploracion Promedio (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>19,98</real_valor><unidad_medida>$/BD</unidad_medida></indicador>
    <indicador><descripcion>Incorporacion de Reservas Probadas y Probables de Crudo (GD)</descripcion><plan_valor>647</plan_valor><real_valor>2</real_valor><unidad_medida>MMBLs</unidad_medida></indicador>
    <indicador><descripcion>Incorporacion de Reservas Probadas y Probables Gas (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>4</real_valor><unidad_medida>MMMPC</unidad_medida></indicador>
    <indicador><descripcion>Contribuciones a las Reservas Probadas de Gas (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>5</real_valor><unidad_medida>MMMPC</unidad_medida></indicador>
    <indicador><descripcion>Produccion Disponible Promedio de Crudo (GD)</descripcion><plan_valor>362,8</plan_valor><real_valor>1401,66</real_valor><unidad_medida>MBD</unidad_medida></indicador>
    <indicador><descripcion>Capacidad de Produccisn de Crudo</descripcion><plan_valor>N/D</plan_valor><real_valor>0</real_valor><unidad_medida>MBD</unidad_medida></indicador>
    <indicador><descripcion>Contribuciones a las Reservas Probadas de Crudo (GD)</descripcion><plan_valor>1750</plan_valor><real_valor>1750</real_valor><unidad_medida>MMBLs</unidad_medida></indicador>
    <indicador><descripcion>Costo Unitario de Operacisn (Conv.)</descripcion><plan_valor>0</plan_valor><real_valor>,01</real_valor><unidad_medida>$/BL</unidad_medida></indicador>
    <indicador><descripcion>Costo Unitario de Operacisn (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>102,53</real_valor><unidad_medida>$/BL</unidad_medida></indicador>
    <indicador><descripcion>Disponibilidad de Gas (Acumulado)</descripcion><plan_valor>N/D</plan_valor><real_valor>0</real_valor><unidad_medida>MMPCD</unidad_medida></indicador>
    <indicador><descripcion>Produccion de Crudo Entregada a RSC Promedio</descripcion><plan_valor>N/D</plan_valor><real_valor>0</real_valor><unidad_medida>MBD</unidad_medida></indicador>
    <indicador><descripcion>Costo de Generacion de Potenc. RA/RC (Conv.)</descripcion><plan_valor>N/D</plan_valor><real_valor>3,15</real_valor><unidad_medida>M$/BD</unidad_medida></indicador>
    <indicador><descripcion>Costo de Generacion de Potenc. RA/RC (GD)</descripcion><plan_valor>N/D</plan_valor><real_valor>0</real_valor><unidad_medida>M$/BD</unidad_medida></indicador>
    </indicadores_gestion_epm>

    Thanks for the reply
    We've tried using the encoding attribute (encoding="ISO-8859-1") but it generates the same errors. We're using XSQL that comes with 9iAS 1.0.2.2.2a. We also tried with XSQL that comes with Oracle 9.2.0. It seems that the parser is not detecting if the XML document has a different encoding than UTF8.

  • AQ Adapter:  Invalid UTF8 encoding.

    Hello,
    I am using the data type XMLType to enqueue data from a database to a BPEL process to integrate with other systems. We are using the AQ Adapter to receive messages from BPEL. For the most part it works, but when we are receiving multiple messages we receive less than expected. We break the result set from the query into 200 record blocks, and place those on the queue. Everything works great going to the queue. However, when the message is dequeued from BPEL, some messages fail with the error: Invalid UTF8 encoding.
    Environment:
    Oracle 10g Enterprise 10.2.0.4.0 - system nls_character_set is AL32UTF8
    Oracle SOA Suite 10.1.3.4
    Data: US English, no double byte languages - using VARCHAR2(BYTE) or VARCHAR2(CHAR) produces same results
    Below are the steps and code snipets we are executing:
    1)     Create XML base document
    <?xml version="1.0" encoding="UTF-8"?>
          <int:INTEGRATION xmlns:sfdc="http://xmlns.oracle.com/xdb/INT_AQADMIN">
          <DATA_SOURCE>' || data_source || '</DATA_SOURCE>
          <OBJECT_NAME>' || object_name || '</OBJECT_NAME>
          <MAP_ID>' || map_id || '</MAP_ID>
    </int:INT_INTEGRATION>2)     A query is run using DBMS_XMLGEN, i.e. select * from <table>, returned as XML (max of 200 records at a time),
    3)     Convert CLOB to XMLType
    4)     Append XML to base xml doc
    5)     Enqueue message
    Code excerpt:
                xml_base := xmltype(build_xml_base(data_source, object_name, map_id));  -- builds message listed above
                qryCtx :=  dbms_xmlgen.newContext (sql_query);
                DBMS_XMLGEN.setRowSetTag(qryCtx, XML_ROWSET_TAG);  -- <DATA>
                DBMS_XMLGEN.setRowTag(qryCtx, XML_ROW_TAG); -- <DATAITEM>
                DBMS_XMLGEN.setMaxRows(qryCtx, XML_MAX_RESULTSET_ROWS); -- 200
                DBMS_XMLGEN.setConvertSpecialChars(qryCtx, true);
                LOOP
                    -- save the XML into the CLOB result.
                    xmlgen_result :=  DBMS_XMLGEN.getXMLtype(qryCtx);
                    -- if no rows exist, exit prior to enqueuing data
                    EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
                     select appendchildxml(xml_base,
                          '/int:INTEGRATION',
                          xmlgen_result,
                          'xmlns:int="http://xmlns.oracle.com/xdb/INT_AQADMIN"')
                    into xml_data from dual;
                    SFDC_AQADMIN.SFDC_INTEGRATION_QUEUE.ENQUEUE_SFDC_OBJECT (xml_data, correlation);
                END LOOP;When the procedure is run, the objects get placed on the queue fine. BPEL starts to dequeue the message from the queue. However, we do not get all of the messages.
    Looking at the BPEL logs describes the problem:
    <2009-10-27 10:49:16,264> <ERROR> <iCareTest.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_ReadMessage: Problem while constructing XML document from Oracle Object payload: java.io.UTFDataFormatException: Invalid UTF8 encoding.
    <2009-10-27 10:49:16,264> <ERROR> <iCareTest.collaxa.cube.activation> <AQ Adapter::Inbound> java.io.UTFDataFormatException: Invalid UTF8 encoding. at oracle.xml.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160) at oracle.xml.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:175) at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120) at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450) at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2488) at oracle.xml.parser.v2.XMLReader.scanNameChars(XMLReader.java:1197) at oracle.xml.parser.v2.XMLReader.scanName(XMLReader.java:1910) at oracle.xml.parser.v2.NonValidatingParser.parseEndTag(NonValidatingParser.java:1358) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1313) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291) at oracle.tip.adapter.aq.database.XMLEngine.stringToDOMSource(XMLEngine.java:324) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:478) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:261) at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51) at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:280) at java.lang.Thread.run(Thread.java:595)
    The line below indicates the byte is not UTF-8
    Invalid UTF8 encoding. at oracle.xml.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160)
    Has anyone seen this? It appears to be something with the AQ Adapter. I cannot see anything strange looking at the XML that is generated. Any help would be greatly appreciated.
    Thanks in advance,
    Jim

    Hi Mark,
    Please mail me your sample data with this character in that file. We can take this as a usecase for our testing team.

  • Invalid UTF8 Encoding

    Dear Hussein,
    I am facing error like for custom reports.
    Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding.
    So i hit this thread Invalid UTF8 encoding
    Could u pls tell me how to change the encoding. Is it from the browser or from reports builder.
    Dear Hussein, Just to save some time i already referenced the document
    Output Post Processor Fails Due to java.io.UTFDataFormatException: Invalid UTF8 encoding [ID 364590.1]
    Thank you
    Taher

    Dear Hussein,
    What is the error in the OPP log file?
    The error is exactly same as in the doc id 364590.1
    [UNEXPECTED] [63452:RT5246390] java.lang.reflect.Invocation
    TargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:479)
    at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:192)
    at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:161
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:
    1015)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:
    968)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:
    209)
    at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
    at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(Te
    mplateHelper.java:5975)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(Templ
    ateHelper.java:3555)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(Templ
    ateHelper.java:3614)
    at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProc
    essor.java:247)
    at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:153
    Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding.
    at oracle.xdo.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:1
    60)
    at oracle.xdo.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:17
    5)
    at oracle.xdo.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120)
    at oracle.xdo.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450)
    at oracle.xdo.parser.v2.XMLReader.fillBuffer(XMLReader.java:2229)
    at oracle.xdo.parser.v2.XMLReader.skipWhiteSpace(XMLReader.java:1974)
    at oracle.xdo.parser.v2.NonValidatingParser.parseMisc(NonValidatingParse
    r.java:331)
    at oracle.xdo.parser.v2.NonValidatingParser.parseProlog(NonValidatingPar
    ser.java:300)
    at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingP
    arser.java:280)
    at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:266)
    ... 17 more
    Did you review the document and see if it is applicable? Do you have the patches applied?
    Yes hussein. I am already on 11.5.10.2 with 10gR2. And regarding the autoconfig patch i am onpatch 4175764 which also has fixed this bug.
    I have checked for all the file versions again the metalink doc id 364590.1 and all files on my instance are at higher version. Except in fnd src/process fdprep.lc 115.31 as i am not able to find its location.
    Thanks a million
    Taher

  • Imported XML errors "java.io.UTFDataFormatException: Invalid UTF8 encoding"

    Hi,
    I had to display a mutli select table region in a Oracle Standard Supplier Site Manage page in R12. So I had a created a custom Stack Layout region and imported in to the database. The import went through fine. Then using Personalization i had created an item with the item style as Stack Layout and in the extends property i mentioned the region path details (xxs/oracle/apps/pos/supplier/webui/XXSByrMngSiteRN) and saved the changes. When i go back to the standard page i am getting the below error stack.
    I tested this in our development instance and it worked fine. when i moved it to the system test environment this issue came up. There is no difference in the patch levels between the development and system test environments. Please let me know if you have any idea about resolving the error.
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.PersistenceException: JBO-26000: A Generic exception occurred during loading Customizations.
    at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2536)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1888)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420)
    at OA.jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:270)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:204)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:322)
    at OA.jspService(_OA.java:221)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.io.UTFDataFormatException: Invalid UTF8 encoding.
    at oracle.xml.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160)
    at oracle.xml.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:175)
    at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120)
    at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450)
    at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2363)
    at oracle.xml.parser.v2.XMLReader.tryRead(XMLReader.java:1087)
    at oracle.xml.parser.v2.XMLReader.scanXMLDecl(XMLReader.java:2922)
    at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:519)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:283)
    at oracle.jbo.mom.MOMParserNonMDS.parse(MOMParserNonMDS.java:138)
    at oracle.jbo.mom.MOMParserNonMDS.readAndParse(MOMParserNonMDS.java:63)
    at oracle.jbo.mom.DefinitionContextStandard.readAndParse(DefinitionContextStandard.java:149)
    at oracle.jbo.mom.DefinitionManager.loadDefElement(DefinitionManager.java:639)
    at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:538)
    at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:425)
    at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:358)
    at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:340)
    at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:700)
    at oracle.jbo.server.ApplicationModuleDefImpl.findDefObject(ApplicationModuleDefImpl.java:232)
    at oracle.jbo.server.ApplicationModuleImpl.createApplicationModule(ApplicationModuleImpl.java:1077)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.createApplicationModule(OAWebBeanContainerHelper.java:468)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:248)
    at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:964)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:931)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:655)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
    at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:964)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:931)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:655)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1166)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:964)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:931)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:655)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:964)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:931)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:655)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2490)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1888)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420)
    at OA.jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:270)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:204)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:322)
    at OA.jspService(_OA.java:221)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    I have also tried the steps mentioned in the below link, I tried the encoding as both UTF8 and UTF-8 but the issue still persists.
    java.io.UTFDataFormatException using WS-I Analyzer
    Regards, Suresh

    Suresh,
    You obviously already know about the OA Framework forum (since you posted the same question over there). That seems like the correct place for this post.
    Also, since you have OA Framework, you have access to Metalink, and since you didn't get any fast answers on the OA Framework Forum, Metalink seems like a really attractive option, no?
    Best,
    john

  • Java.io.UTFDataFormatException: Invalid UTF8 encoding.

    Hi Java Gurus,
    I am parsing XML document string, source are sockets. I am suddenly getting error msg
    'java.io.UTFDataFormatException: Invalid UTF8 encoding.'
    I have both message msg working correctly and incorrectly .... I can not see a single difference in the document except the contents ...
    Working string ---------------->
    <?xml version="1.0"?>
    <APPLICATIONMESSAGE>
    <SequenceId>1938</SequenceId>
    <MessageId>80010</MessageId>
    <TimeStamp>1083682030</TimeStamp>
    <MessageData>
    <TRANSACTIONMESSAGE>
    <Priority>2</Priority>
    <TxNo>3151166 </TxNo>
    <TxCode>UNLDIMSI</TxCode>
    <Dest>HLR30 </Dest>
    <IMSI>219019100068487</IMSI>
    <MSISDN> </MSISDN>
    <Length> 19</Length>
    <Message>0006219019100068487</Message>
    <Timestamp>1083682030000</Timestamp>
    </TRANSACTIONMESSAGE>
    </MessageData>
    </APPLICATIONMESSAGE>
    Not working xml document ----->
    <?xml version="1.0"?>
    <APPLICATIONMESSAGE>
    <SequenceId>1927</SequenceId>
    <MessageId>80010</MessageId>
    <TimeStamp>1083681243</TimeStamp>
    <MessageData>
    <TRANSACTIONMESSAGE>
    <Priority>2</Priority>
    <TxNo>3164165 </TxNo>
    <TxCode>CHVPNUSR</TxCode>
    <Dest>VPN01 </Dest>
    <IMSI>190 </IMSI>
    <MSISDN> </MSISDN>
    <Length>340</Length>
    <Message>0300190 0301549169 0305SVE 0306N0307SVE 0308N0312DONJA KUP�INA 212 0313N0314 0315MATAS 0316DAMIR 0326Y0328N033010332N0333Y0350 0351N0352 0353 0354N</Message>
    <Timestamp>1083681243000</Timestamp>
    </TRANSACTIONMESSAGE>
    </MessageData>
    </APPLICATIONMESSAGE>
    this is giving me error ---->
    java.io.UTFDataFormatException: Invalid UTF8 encoding.
    at oracle.xml.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160)
    at oracle.xml.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:175)
    at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120)
    at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:448)
    at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2026)
    at oracle.xml.parser.v2.XMLReader.skipWhiteSpace(XMLReader.java:1805)
    at oracle.xml.parser.v2.NonValidatingParser.parseMisc(NonValidatingParser.java:311)
    at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:280)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:260)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:228)
    at com.bc.framework.xml.ParseXMLFromString.parseString(ParseXMLFromString.java:85)
    at com.bc.framework.handlers.ConversationRequestHandler.mHandlePush(ConversationRequestHandler.java:306)
    at com.bc.framework.handlers.ConversationRequestHandler.handleRequest(ConversationRequestHandler.java:227)
    at com.bc.framework.handlers.ConversationRequestHandler.run(ConversationRequestHandler.java:191)
    at com.bc.framework.threadPool.HandlerThreadWorker.mRunIt(HandlerThreadWorker.java:344)
    at com.bc.framework.threadPool.HandlerThreadWorker.mRunWork(HandlerThreadWorker.java:311)
    at com.bc.framework.threadPool.HandlerThreadWorker.access$000(HandlerThreadWorker.java:48)
    at com.bc.framework.threadPool.HandlerThreadWorker$1.run(HandlerThreadWorker.java:376)
    at java.lang.Thread.run(Thread.java:484)
    anyone have any suggestion ....

    Well utf-8 is the encoding so it isn't suprising that it's the content.
    Probably has something to do with:
    KUP�INA
    In the second message. Note the character that won't display.

  • Force jvm to use UTF8 encoding for properties?

    hi,
    my problem is i cannot display turkish characters that are retrieved from properties file [(key, value) pair].The value may contain turkish characters.
    reference : java toc
    "..When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence..."
    instead of iso 8859-1 or directly representing non-conforming characters in the form of UTF8 encoding , i want to use UTF8 . i dont know is there a way to enforce the encoding to UTF8 .is it possible ?
    note : javac -encoding or java -Djava.encoding has no use..
    thanx in advance

    Hi,
    I did a lot of testing with the method of my last posting and ran into the following problem: each character, that is not available in iso 8859-1 is discarded and replaced by a '?'. So when e.g. loading arabic characters you get just "?????" as your property's value.
    The only possibility to enable other encodings of Property Files is to replace the encoding of the reader to one that is better suited. So I created a customized class, that inherits from java.util.Properties, and supports loading and storing to any encoding. This class I give here:
    * Properties.java
    * Created on 11. Juni 2003, 14:08
    package xy;
    * The <code>Properties</code> class represents a persistent set of
    * properties. The <code>Properties</code> can be saved to a stream
    * or loaded from a stream. Each key and its corresponding value in
    * the property list is a string.
    * <p>
    * A property list can contain another property list as its
    * "defaults"; this second property list is searched if
    * the property key is not found in the original property list.
    * <p>
    * Because <code>Properties</code> inherits from <code>Hashtable</code>, the
    * <code>put</code> and <code>putAll</code> methods can be applied to a
    * <code>Properties</code> object.  Their use is strongly discouraged as they
    * allow the caller to insert entries whose keys or values are not
    * <code>Strings</code>.  The <code>setProperty</code> method should be used
    * instead.  If the <code>store</code> or <code>save</code> method is called
    * on a "compromised" <code>Properties</code> object that contains a
    * non-<code>String</code> key or value, the call will fail.
    * <p>
    * <a name="encoding"></a>
    * When saving properties to a stream or loading them from a stream, the
    * ISO 8859-1 character encoding can be used. For characters that cannot be directly
    * represented in this encoding,
    * <a href="http://java.sun.com/docs/books/jls/html/3.doc.html#100850">Unicode escapes</a>
    * are used; however, only a single 'u' character is allowed in an escape sequence.
    * The native2ascii tool can be used to convert property files to and from
    * other character encodings.
    * </p>
    * <p>
    * This Properties class is an extension of the default properties class an supports the
    * loading and saving from and into other encodings than ISO 8859-1.
    * </p>
    * @see <a href="../../../tooldocs/solaris/native2ascii.html">native2ascii tool for Solaris</a>
    * @see <a href="../../../tooldocs/win32/native2ascii.html">native2ascii tool for Windows</a>
    * @author  Gregor Kappler, extended the class of JDK by
    * @author  Arthur van Hoff
    * @author  Michael McCloskey
    * @version 1.64, 06/26/00
    * @since   JDK1.0
    public class Properties extends java.util.Properties {
        private static final String keyValueSeparators = "=: \t\r\n\f";
        private static final String strictKeyValueSeparators = "=:";
        private static final String specialSaveChars = "=: \t\r\n\f#!";
        private static final String whiteSpaceChars = " \t\r\n\f";
        /** Creates a new instance of Properties */
        public Properties() {
         * Reads a property list (key and element pairs) from the input stream.
         * The stream is assumed to be in the specified character encoding.
         * <p>
         * Every property occupies one line of the input stream. Each line
         * is terminated by a line terminator (<code>\n</code> or <code>\r</code>
         * or <code>\r\n</code>). Lines from the input stream are processed until
         * end of file is reached on the input stream.
         * <p>
         * A line that contains only whitespace or whose first non-whitespace
         * character is an ASCII <code>#</code> or <code>!</code> is ignored
         * (thus, <code>#</code> or <code>!</code> indicate comment lines).
         * <p>
         * Every line other than a blank line or a comment line describes one
         * property to be added to the table (except that if a line ends with \,
         * then the following line, if it exists, is treated as a continuation
         * line, as described
         * below). The key consists of all the characters in the line starting
         * with the first non-whitespace character and up to, but not including,
         * the first ASCII <code>=</code>, <code>:</code>, or whitespace
         * character. All of the key termination characters may be included in
         * the key by preceding them with a \.
         * Any whitespace after the key is skipped; if the first non-whitespace
         * character after the key is <code>=</code> or <code>:</code>, then it
         * is ignored and any whitespace characters after it are also skipped.
         * All remaining characters on the line become part of the associated
         * element string. Within the element string, the ASCII
         * escape sequences <code>\t</code>, <code>\n</code>,
         * <code>\r</code>, <code>\\</code>, <code>\"</code>, <code>\'</code>,
         * <code>\  </code>  (a backslash and a space)
         * are recognized and converted to single
         * characters. Moreover, if the last character on the line is
         * <code>\</code>, then the next line is treated as a continuation of the
         * current line; the <code>\</code> and line terminator are simply
         * discarded, and any leading whitespace characters on the continuation
         * line are also discarded and are not part of the element string. <br>
         * Note:
         * <code>\u</code><i>xxxx</i> is not supported if the encoding is not
         * ISO 8859-1!
         * <p>
         * As an example, each of the following four lines specifies the key
         * <code>"Truth"</code> and the associated element value
         * <code>"Beauty"</code>:
         * <p>
         * <pre>
         * Truth = Beauty
         *     Truth:Beauty
         * Truth               :Beauty
         * </pre>
         * As another example, the following three lines specify a single
         * property:
         * <p>
         * <pre>
         * fruits                    apple, banana, pear, \
         *                                  cantaloupe, watermelon, \
         *                                  kiwi, mango
         * </pre>
         * The key is <code>"fruits"</code> and the associated element is:
         * <p>
         * <pre>"apple, banana, pear, cantaloupe, watermelon, kiwi, mango"</pre>
         * Note that a space appears before each <code>\</code> so that a space
         * will appear after each comma in the final result; the <code>\</code>,
         * line terminator, and leading whitespace on the continuation line are
         * merely discarded and are <i>not</i> replaced by one or more other
         * characters.
         * <p>
         * As a third example, the line:
         * <p>
         * <pre>cheeses
         * </pre>
         * specifies that the key is <code>"cheeses"</code> and the associated
         * element is the empty string.<p>
         * @param      inStream   the input stream.
         * @exception  IOException  if an error occurred when reading from the
         *               input stream.
        public synchronized void load(java.io.InputStream inStream, java.nio.charset.Charset encoding) throws java.io.IOException {
            if (encoding.equals (encoding.forName("8859_1"))) {
                super.load (inStream);
                return;
            java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(inStream, encoding));
         while (true) {
                // Get next line
                String line = in.readLine();
                if (line == null)
                    return;
                if (line.length() > 0) {
                    // Continue lines that end in slashes if they are not comments
                    char firstChar = line.charAt(0);
                    if ((firstChar != '#') && (firstChar != '!')) {
                        while (continueLine(line)) {
                            String nextLine = in.readLine();
                            if(nextLine == null)
                                nextLine = "";
                            String loppedLine = line.substring(0, line.length()-1);
                            // Advance beyond whitespace on new line
                            int startIndex=0;
                            for(startIndex=0; startIndex<nextLine.length(); startIndex++)
                                if (whiteSpaceChars.indexOf(nextLine.charAt(startIndex)) == -1)
                                    break;
                            nextLine = nextLine.substring(startIndex,nextLine.length());
                            line = new String(loppedLine+nextLine);
                        // Find start of key
                        int len = line.length();
                        int keyStart;
                        for(keyStart=0; keyStart<len; keyStart++) {
                            if(whiteSpaceChars.indexOf(line.charAt(keyStart)) == -1)
                                break;
                        // Blank lines are ignored
                        if (keyStart == len)
                            continue;
                        // Find separation between key and value
                        int separatorIndex;
                        for(separatorIndex=keyStart; separatorIndex<len; separatorIndex++) {
                            char currentChar = line.charAt(separatorIndex);
                            if (currentChar == '\\')
                                separatorIndex++;
                            else if(keyValueSeparators.indexOf(currentChar) != -1)
                                break;
                        // Skip over whitespace after key if any
                        int valueIndex;
                        for (valueIndex=separatorIndex; valueIndex<len; valueIndex++)
                            if (whiteSpaceChars.indexOf(line.charAt(valueIndex)) == -1)
                                break;
                        // Skip over one non whitespace key value separators if any
                        if (valueIndex < len)
                            if (strictKeyValueSeparators.indexOf(line.charAt(valueIndex)) != -1)
                                valueIndex++;
                        // Skip over white space after other separators if any
                        while (valueIndex < len) {
                            if (whiteSpaceChars.indexOf(line.charAt(valueIndex)) == -1)
                                break;
                            valueIndex++;
                        String key = line.substring(keyStart, separatorIndex);
                        String value = (separatorIndex < len) ? line.substring(valueIndex, len) : "";
                        // Convert then store key and value
                        key = loadConvert(key);
                        value = loadConvert(value);
                        put(key, value);
         * Writes this property list (key and element pairs) in this
         * <code>Properties</code> table to the output stream in a format suitable
         * for loading into a <code>Properties</code> table using the
         * <code>load</code> method.
         * The stream is written using the ISO 8859-1 character encoding.
         * <p>
         * Properties from the defaults table of this <code>Properties</code>
         * table (if any) are <i>not</i> written out by this method.
         * <p>
         * If the header argument is not null, then an ASCII <code>#</code>
         * character, the header string, and a line separator are first written
         * to the output stream. Thus, the <code>header</code> can serve as an
         * identifying comment.
         * <p>
         * Next, a comment line is always written, consisting of an ASCII
         * <code>#</code> character, the current date and time (as if produced
         * by the <code>toString</code> method of <code>Date</code> for the
         * current time), and a line separator as generated by the Writer.
         * <p>
         * Then every entry in this <code>Properties</code> table is written out,
         * one per line. For each entry the key string is written, then an ASCII
         * <code>=</code>, then the associated element string. Each character of
         * the element string is examined to see whether it should be rendered as
         * an escape sequence. The ASCII characters <code>\</code>, tab, newline,
         * and carriage return are written as <code>\\</code>, <code>\t</code>,
         * <code>\n</code>, and <code>\r</code>, respectively. Characters less
         * than <code>\u0020</code> and characters greater than
         * <code>\u007E</code> are written as <code>\u</code><i>xxxx</i> for
         * the appropriate hexadecimal value <i>xxxx</i>. Leading space characters,
         * but not embedded or trailing space characters, are written with a
         * preceding <code>\</code>. The key and value characters <code>#</code>,
         * <code>!</code>, <code>=</code>, and <code>:</code> are written with a
         * preceding slash to ensure that they are properly loaded.
         * <p>
         * After the entries have been written, the output stream is flushed.  The
         * output stream remains open after this method returns.
         * @param   out      an output stream.
         * @param   header   a description of the property list.
         * @exception  IOException if writing this property list to the specified
         *             output stream throws an <tt>IOException</tt>.
         * @exception  ClassCastException  if this <code>Properties</code> object
         *             contains any keys or values that are not <code>Strings</code>.
         * @exception  NullPointerException  if <code>out</code> is null.
         * @since 1.2
        public synchronized void store(java.io.OutputStream out, java.nio.charset.Charset encoding, String header)
        throws java.io.IOException
            if (encoding.equals (encoding.forName("8859_1"))) {
                super.store (out,header);
                return;
            java.io.BufferedWriter awriter;
            awriter = new java.io.BufferedWriter(new java.io.OutputStreamWriter(out,encoding));
            if (header != null)
                writeln(awriter, "#" + header);
            writeln(awriter, "#" + new java.util.Date().toString());
            for (java.util.Enumeration e = keys(); e.hasMoreElements();) {
                String key = (String)e.nextElement();
                String val = (String)get(key);
                key = saveConvert(key, true);
             /* No need to escape embedded and trailing spaces for value, hence
              * pass false to flag.
                val = saveConvert(val, false);
                writeln(awriter, key + "=" + val);
            awriter.flush();
         * changes special saved chars to their original forms
        private String loadConvert (String theString) {
            char aChar;
            int len = theString.length();
            StringBuffer outBuffer = new StringBuffer(len);
            for(int x=0; x<len; ) {
                aChar = theString.charAt(x++);
                if (aChar == '\\') {
                    aChar = theString.charAt(x++);
                    if (aChar == 't') aChar = '\t';
                    else if (aChar == 'r') aChar = '\r';
                    else if (aChar == 'n') aChar = '\n';
                    else if (aChar == 'f') aChar = '\f';
                    else if (aChar == '\\') aChar = '\\';
                    else if (aChar == '\"') aChar = '\"';
                    else if (aChar == '\'') aChar = '\'';
                    else if (aChar == ' ') aChar = ' ';
                    else
                        throw new IllegalArgumentException ("error in Encoding: '\\"+aChar+" not supported");
                    outBuffer.append(aChar);
                } else
                    outBuffer.append(aChar);
            return outBuffer.toString();
         * writes out any of the characters in specialSaveChars
         * with a preceding slash
        private String saveConvert(String theString, boolean escapeSpace) {
            int len = theString.length();
            StringBuffer outBuffer = new StringBuffer(len*2);
            for(int x=0; x<len; x++) {
                char aChar = theString.charAt(x);
                switch(aChar) {
              case ' ':
                  if (x == 0 || escapeSpace)
                   outBuffer.append('\\');
                  outBuffer.append(' ');
                  break;
                    case '\\':outBuffer.append('\\'); outBuffer.append('\\');
                              break;
                    case '\t':outBuffer.append('\\'); outBuffer.append('t');
                              break;
                    case '\n':outBuffer.append('\\'); outBuffer.append('n');
                              break;
                    case '\r':outBuffer.append('\\'); outBuffer.append('r');
                              break;
                    case '\f':outBuffer.append('\\'); outBuffer.append('f');
                              break;
                    default:
    //                    if ((aChar < 0x0020) || (aChar > 0x007e)) {
    //                        outBuffer.append(aChar);
    //                    } else {
                            if (specialSaveChars.indexOf(aChar) != -1)
                                outBuffer.append('\\');
                            outBuffer.append(aChar);
            return outBuffer.toString();
         * Returns true if the given line is a line that must
         * be appended to the next line
        private boolean continueLine (String line) {
            int slashCount = 0;
            int index = line.length() - 1;
            while((index >= 0) && (line.charAt(index--) == '\\'))
                slashCount++;
            return (slashCount % 2 == 1);
        private static void writeln(java.io.BufferedWriter bw, String s) throws java.io.IOException {
            bw.write(s);
            bw.newLine();
    }I hope you can use this class for your needs as I can. For me it supports any characters so far. If you find some bugs on it, let me know
    Regards,
    Gregor Kappler

  • [SOLVED] xfce4 automounting problem on usb dev with utf8 encoded files

    I have problem of auto mounting usb external drive contains utf8 encoded files under xfce4.
    Using hal and dbus for usb device detection.
    Heard that I need to add iocharset=utf8 under fstab or hal fdi configure files and tried them all but didn't work
    usb devices with vfat always got mounted with default charset.
    I found out that exo-mount is the one doing the actual mounting and that it is the one that cannot take all extra mounting options such as iocharset etc.
    Have tried gnome to mount this hard drive and works find with nautilus option that let me set various mount options for each harddrive.
    Is there any way to replace exo-mount with some other alternative mounting tools that work with thunar?
    Any workaround will be helpful as long as I can mount my usb drives with prefer charset so that I don't have to guess all ???marked files.
    Heard that xubuntu replaced that exo-mount with gnome-mount to handle drives with extra mount options such as iocharset.
    but I am pretty new to configuring things and couldn't find the step by step instruction for this so please provide the complete solution.
    Link to the pages that explain workaround would be nice as well.
    Thanks in advance!
    Last edited by axca (2007-10-17 18:24:50)

    Found the patch for exo-mount so that it takes additional mount options HAL suggests.
    https://bugzilla.altlinux.org/attachmen … ction=diff
    Now my usb drive can be mounted with the proper charset.
    Hope this patch helps others with similar situation as well!
    Last edited by axca (2007-10-15 15:41:47)

  • Wrong utf8  encoding  for one "BAD" cyrillic letter И  ?

    Hi everybody!
    I have JDeveloper 10.1.2.1.0.
    The web server is embeded OC4J server or standalone OC4J container. (10.3)
    The database is running in CL8MSWIN1251 character set. (I tried 9.2.0.8 and 10.2 with the the some result).
    I generated PL/SQL web-service,
    based on the simple packаged procedure:
    FUNCTION testConnection RETURN XMLType
    IS
    v XMLType;
    v_session_user VARCHAR2(32);
    v_db_name VARCHAR2(32);
    v_language VARCHAR2(32);
    BEGIN
    v := XMLType('<?xml version="1.0" encoding="UTF-8"?>
    <root>
    <ROW>
    <DevelopedBy>'||convert('АБВГДЕ','UTF8','CL8MSWIN1251')||'<DevelopedBy>
    </ROW>
    </root>
    RETURN v;
    END testConnection;
    It works, and as a responce of the service I get correct XML:
    - <ROW>
    <DevelopedBy>АБВГД</DevelopedBy>
    </ROW>
    Problem occurs when procedure must return one special cyrillic letter И (И Capital) UTF-8; d0,98.
    For "small" и (UTF-8 d0,b8) everithing is OK.
    In case when output must be <DevelopedBy>И</DevelopedBy>
    I got an error message:
    - <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>java.sql.SQLException: Invalid UTF8 encoding.</faultstring> <faultactor>/WebXML/WebService1</faultactor>
    </SOAP-ENV:Fault>
    In System.out I can see an error stack:
    08/01/05 22:48:05 java.io.UTFDataFormatException: Invalid UTF8 encoding.
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160)
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:175)
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120)
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450)
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2254)
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLReader.skipWhiteSpace(XMLReader.java:1999)
    08/01/05 22:48:05      at oracle.xml.parser.v2.NonValidatingParser.parseMisc(NonValidatingParser.java:331)
    08/01/05 22:48:05      at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:300)
    08/01/05 22:48:05      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:280)
    08/01/05 22:48:05      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:196)
    08/01/05 22:48:05      at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:151)
    08/01/05 22:48:05      at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:107)
    08/01/05 22:48:05      at dbl92.WebService1Impl.testconnection(WebService1Impl.sqlj:85)
    So the cyrillic letter И in UTF8 encoding is a spcecial case???
    Can somebody help me
    Sergey Stoklitskiy,
    Moscow

    The problem is gone. Kopete suddenly was working again after copying and pasting a text from a website and sending it to one of my contacts.

  • XDO Log shows - java.io.UTFDataFormatException: Invalid UTF8 encoding

    We have a XDO Region in our OA Page - that calls XML Publisher Report taking as input a XML File generated from a concurrent program. The concurrent program calls a PL/SQL Program to generate the XML File.
    The XML File has the encoding fetched from
    select tag from fnd_lookup_values
      where lookup_type = 'FND_ISO_CHARACTER_SET_MAP'
      and lookup_code = ( select value from v$nls_parameters where parameter='NLS_CHARACTERSET')
      and language='US' ;
    The tag = 'UTF-8' and hence the encoding in XML File is as -
    <?xml version="1.0" encoding="UTF-8"?>
    The XML File is getting created successfully.. But XML Publisher is not able to process the report properly and is displaying the error - An error encountered either due to invalid Template details or due to null Data Input Stream.
    The XDO Log shows -
    [022113_075210160][][EXCEPTION] java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:570)
        at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
        at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
        at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
        at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
        at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
        at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
        at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
        at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
        at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
        at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
        at oracle.apps.xdo.oa.common.DocumentHelper.exportDocument(DocumentHelper.java:443)
        at oracle.apps.xdo.oa.common.webui.DocumentViewerCO.exportDocument(DocumentViewerCO.java:806)
        at oracle.apps.xdo.oa.common.webui.DocumentViewerCO.processFormRequest(DocumentViewerCO.java:744)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
        at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processFormRequest(OAHeaderBean.java:410)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
        at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
        at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1214)
        at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
        at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
        at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
        at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
        at _OA._jspService(_OA.java:212)
        at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
        at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
        at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
        at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
        at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
        at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
        at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
        at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
        at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
        at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding.
        at oracle.xdo.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160)
        at oracle.xdo.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:187)
        at oracle.xdo.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120)
        at oracle.xdo.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450)
        at oracle.xdo.parser.v2.XMLReader.fillBuffer(XMLReader.java:2294)
        at oracle.xdo.parser.v2.XMLReader.skipWhiteSpace(XMLReader.java:2039)
        at oracle.xdo.parser.v2.NonValidatingParser.parseMisc(NonValidatingParser.java:355)
        at oracle.xdo.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:324)
        at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:284)
        at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:289)
        ... 65 more
    We have already tried to apply
    AP/AR Netting Report Fails With Invalid Template Or Null Data Input Stream When Run From OA Page [ID 985032.1]
    Service Charges Report: An error encountered either due to invalid Template details or due to null [Article ID 1068524.1]
    All this because one of the tag in XML has a Spanish character - Más antigua a más.
    Please advise.

    Any updates regarding this.
    Thanks

  • ISO-8859-1 / Invalid UTF8 encoding

    Hello!
    I have nearly the same problem like V Prakash (ISO8859 & UTF 8
    default encoding)
    I am parsing a XML-Document with ISO-8859-1 encoding. The file
    has no XML-Declaration.
    I use the "setEncoding(String)"-method of class
    oracle.xml.parser.v2.XMLDocument to set the right encoding.
    The result is a
    java.io.UTFDataFormatException: Invalid UTF8 encoding
    What's wrong with my code or is it a bug in Oracle XMLParser
    v2.0.0.2 ?
    Thanks
    Peter
    null

    Attachments: "1|type=application/octet-stream|desc=UTF-8 Encoding Error|2719|file=epm00001.xml|"
    Interesting...again, the web page said I didn't have permission.
    Here goes nothing...
    Oracle XML Team wrote:
    : Scott Sosna (guest) wrote:
    : : No go...I'm going to try to attach the files, but the last
    : time
    : : I tried to do so, it didn't work.
    : : Oracle XML Team wrote:
    : : : Scott Sosna (guest) wrote:
    : : : : Here's the test case you wanted.
    : : : : <!ELEMENT B (#PCDATA|PERF)*>
    : : : : <!ELEMENT I (#PCDATA|ALBUM|RATING|B)*>
    : : : : <!ELEMENT P (#PCDATA|B|I|RATING)*>
    : : : : <!ELEMENT EPM (ARTICLE*)>
    : : : : <!ELEMENT ARTICLE
    : : : : (HEADWORD,BIOGRAPHY,
    : : : (DISCOGRAPHY|VIDEOGRAPHY|BIBLIOGRAPHY|FILMOG
    : : : : RAPHY|COMPILATIONS)*,COPYRIGHT)>
    : : : : <!ATTLIST ARTICLE Performer CDATA
    #IMPLIED>
    : : : : <!ATTLIST ARTICLE ArtID CDATA #IMPLIED>
    : : : : <!ELEMENT HEADWORD (P)>
    : : : : <!ELEMENT BIOGRAPHY (#PCDATA|P)*>
    : : : : <!ELEMENT DISCOGRAPHY (I|P)*>
    : : : : <!ELEMENT COPYRIGHT (P)>
    : : : : <!ELEMENT PERF (#PCDATA)>
    : : : : <!ATTLIST PERF LINK CDATA
    #REQUIRED>
    : : : : <!ELEMENT ALBUM (#PCDATA|B)*>
    : : : : <!ATTLIST ALBUM LINK CDATA
    #REQUIRED>
    : : : : <!ELEMENT RATING (#PCDATA)*>
    : : : : <!ATTLIST RATING rank CDATA
    #REQUIRED>
    : : : : <!ATTLIST RATING text CDATA
    #REQUIRED>
    : : : : <!ELEMENT FILMOGRAPHY (P)>
    : : : : <!ELEMENT COMPILATIONS (P)>
    : : : : <!ELEMENT BIBLIOGRAPHY (P)>
    : : : : <!ELEMENT VIDEOGRAPHY (P)>
    : : : : <?xml version="1.0" standalone="no"?>
    : : : : <!DOCTYPE EPM SYSTEM "epm.dtd">
    : : : : <EPM>
    : : : : <ARTICLE Performer="Johansson, Jan"
    : : : : ArtID="13994"><HEADWORD>
    Johansson,
    : : : : Jan</P></HEADWORD><BIOGRAPHY>
    b. 16 September 1931,
    : : : Swderhamn,
    : : : : Sweden, d. 9 November 1968, Stockholm, Sweden. Johansson
    : was
    : : a
    : : : : pianist, composer and arranger who became known to
    : European
    : : : : audiences as a member of <PERF LINK="Getz, Stan">Stan
    : : : : Getz</PERF> &#237;s quartet touring with <PERF
    : : : : LINK="Granz, Norman">Norman Granz</PERF> &#237;s
    JATP
    : : : : concerts in 1960. The following year he joined Arne
    : : : : Domn...rus &#237;s band, and also the Swedish Radio
    : Jazz
    : : : : Group, in 1967, composing and arranging for both.
    : Johansson
    : : : also
    : : : : wrote for film, theatre, ballet (e.g. Rwrelser )
    : and
    : : : : television (e.g. the Pippi Lngstrwmpa tune). He reached
    a
    : : : broad
    : : : : audience with sensitive renditions of Swedish folk
    songs.
    : : His
    : : : : considerable talents as composer and arranger were
    : : especially
    : : : : apparent in his experimental writing for the Radio Jazz
    : : Group,
    : : : : which fused and reinterpreted European art music, folk
    and
    : : : jazz
    : : : : in ways that went beyond the <PERF LINK="Basie,
    : : : Count">Count
    : : : : Basie</PERF> or <PERF LINK="Kenton, Stan">Stan
    : : : : Kenton</PERF> formats for big band jazz ( Den
    Korta
    : : : : Fristen ). As a jazz pianist in a trio context,
    : : Johansson
    : : : : adopted a swinging <PERF LINK="Kelly, Wynton">Wynton
    : : : : Kelly</PERF> -like style, but his skill in fully
    : : exploring
    : : : : the potentialities of a song far exceeded the American
    : : : musician
    : : : : (e.g. &#235;Willow Weep For Me&#237; on 8 Bitar
    : : Not
    : : : to
    : : : : be confused with Jan Johansson, the guitarist and music
    : : : : teacher.</P></BIOGRAPHY>
    : : : : <DISCOGRAPHY>
    Rwrelser (Megafon, 1963)<RATING
    : : : : rank="3" text="Good" >***</RATING>, Jazz P
    Svenska
    : : : : (Megafon 1964), Younger Than Springtime (Artist
    : : : : 1972)<RATING rank="4" text="Excellent" >****</RATING>,
    : 8
    : : : : Bitar/Innertrio (Megafon 1989)<RATING rank="3"
    : : text="Good"
    : : : : >***</RATING>, Jan Johansson &#038; Radiojazzgruppen:
    : Den
    : : : : Korte Fristen (Megafon 1991)<RATING rank="3"
    : text="Good"
    : : : : >***</RATING>, 300.000 Km/h (Heptagon
    1994)<RATING
    : : : : rank="4" text="Excellent" >****</RATING>, Musik Genom
    : : Fyra
    : : : : Sekler Med Jan Johansson (Heptagon 1994)<RATING
    : rank="3"
    : : : : text="Good" >***</RATING>, Jan Johansson Spelar Musik
    : P
    : : : Sitt
    : : : : Eget Vis (Heptagon 1995)<RATING rank="3" text="Good"
    : : : : >***</RATING>, En Resa I Jazz Och Folkton
    (Heptagon
    : : : : 1995)<RATING rank="3" text="Good" >***</RATING>, Jazz
    : P
    : : : : Ungerska/In Pleno (Heptagon 1996)<RATING rank="3"
    : : : : text="Good" >***</RATING>.</P></DISCOGRAPHY>
    : : : : <COPYRIGHT>
    Encyclopedia of Popular Music
    : : : : Copyright Muze UK Ltd. 1989 -
    : 1999</P></COPYRIGHT></ARTICLE>
    : : : : </EPM>
    : : : You need to start with
    : : : <?xml version="1.0" standalone="no"
    encoding="ISO-8859-1"?>
    : : : otherwise it will use UTF-8 as the default encoding. If
    this
    : : : does not solve your problem please post a new message
    using
    : : the
    : : : Attach File option as we have found the act of cutting and
    : : : pasting from a message can "fix" encoding problems.
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    : It worked the last time with your DTD File as I see it as an
    : attachement. Simply start a new thread and attach the XML
    file.
    : Oracle XML Team
    : http://technet.oracle.com
    : Oracle Technology Network
    null

  • XMLReader throws "Invalid UTF8 encoding." - Need parser for ISO-8859-1 chrs

    Hi,
    We are facing an issue when we try to send data which is encoded in "ISO-8859-1" charset (german chars) via the EMDClient (agent), which tries to parse it using the oracle.xml.parser.v2.XMLParser . The parser, while trying to read it, is unable to determine the charset encoding of our data and assumes that the encoding is "UTF-8", and when it tries to read it, throws the :
    "java.io.UTFDataFormatException: Invalid UTF8 encoding." exception.
    I looked at the XMLReader's code and found that it tries to read the first 4 bytes (Byte Order Mark - BOM) to determine the encoding. It is probably expecting us to send the data where the first line is probably:
    <?xml version="1.0" encoding="iso88591" ?>
    But, the data that our application sends is typically as below:
    ========================================================
    # listener.ora Network Configuration File: /ade/vivsharm_emsa2/oracle/work/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = semsa2)
    (ORACLE_HOME = /ade/vivsharm_emsa2/oracle)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = tcp)(HOST = stadm18.us.oracle.com)(PORT = 15100))
    ========================================================
    the first 4 bytes in our case will be, int[] {35, 32, 108, 105} == chars {#, SPACE, l, i},
    which does not match any of the encodings predefined in oracle.xml.parser.v2.XMLReader.pushXMLReader() method.
    How do we ensure that the parser identifies the encoding properly and instantiates the correct parser for "ISO-8859-1"...
    Should we just add the line <?xml version="1.0" encoding="iso88591" ?> at the beginning of our data?
    We have tried constructing the inputstream (ByteArrayInputStream) by using String.getBytes("ISO-8859-1") and passing that to the parser, but that does not seem to work.
    Please suggest.
    Thanks & Regards,
    Vivek.
    PS: The exception we get is as below:
    java.io.UTFDataFormatException: Invalid UTF8 encoding.
    at oracle.xml.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160)
    at oracle.xml.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:187)
    at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120)
    at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450)
    at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2229)
    at oracle.xml.parser.v2.XMLReader.tryRead(XMLReader.java:994)
    at oracle.xml.parser.v2.XMLReader.scanXMLDecl(XMLReader.java:2788)
    at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:502)
    at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:205)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:180)
    at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:431)
    at oracle.sysman.emSDK.emd.comm.RemoteOperationInputStream.readXML(RemoteOperationInputStream.java:363)
    at oracle.sysman.emSDK.emd.comm.RemoteOperationInputStream.readHeader(RemoteOperationInputStream.java:195)
    at oracle.sysman.emSDK.emd.comm.RemoteOperationInputStream.read(RemoteOperationInputStream.java:151)
    at oracle.sysman.emSDK.emd.comm.EMDClient.remotePut(EMDClient.java:2075)
    at oracle.sysman.emo.net.util.agent.Operation.saveFile(Operation.java:758)
    at oracle.sysman.emo.net.common.WebIOHandler.saveFile(WebIOHandler.java:152)
    at oracle.sysman.emo.net.common.BaseWebConfigContext.saveConfig(BaseWebConfigContext.java:505)

    Vivek
    Your message is not XML. I believe that the XMLParser is going to have problems with that as well. Perhaps you could wrap the message in an XML tag set and begin the document as you suggested with <?xml version="1.0" encoding="iso88591"?>.
    You are correct in that the parser uses only the first 4 bytes to detect the encoding of the document. It can only determine if the document in ASCII or EPCDIC based. If it is ASCII it can detect only between UTF-8 and UTF-16. It will need the encoding attribute to recognize the ISO-8859-1 encoding.
    hope this helps
    tom

  • Assuring UTF8 encoding via extension

    Folks:
    DW CS3 on MacOS 10.6.x
    I have a lot of legacy files encoded in ISO Latin-1 and I'd like to convert every one to UTF8.  It's sufficient to convert files one-by-one as I work on them for other reasons, so I'm thinking of adding a modification to the _onOpen  or _beforeSave mechanisms.   I don't speak JS, but I've managed to hack around and do something useful via the _afterSave hook, without apparent damage.
    Opening a file, manually mousing to Modify --> Page Properties --> Title/Encoding reveals the current encoding and supports changing the encoding via a pull-down.  "OK" and File --> Save, and it's done.   Tedious.  It should be possible to do this automagically, or at least semi-automagically. (Alert("This file is not encoded as UTF-8. Do you want to correct this?")
    The DW CS3  API Reference gives this call:
       dom.getCharSet()
    so I know how to test the current encoding; if this call returns UTF8 (spelled somehow), there's nothing to do.
    But I cannot figure out how to change the encoding.   Am I just missing something in API Reference?  Or am I missing something fundamental about how DW groks html and deals with encoding? 
    I've looked around for example code snippets.  The first step would probably be to call "dom.getCharSet()" but I haven't discovered anything by searching for this.
    Can anyone direct me to a tutoria or reference section on changing the document encoding, or a relevant code snippet?
    TIA,
    hen3ry

    David Powers:
    Thank you for your response.  You uncovered some failures in my original question:
    First, I should have mentioned that most of the legacy files contain no meta tags in the header. In fact they cannot contain headers, as they are header-less html snippets that will be included by a CMS, which provides its own header material.  As I understand the applicable standard, only one set of headers is allowed.
    Second, I mistakenly omitted the fact that some of the files may not be encoded Latin-1.    This is one of the joys of inheriting old material and revisiting one's past naive errors.
    Third,  I should have said more clearly that I seek an "command extension-driven" equivalent to the manual operation of mousing to Modify --> Page Properties --> Title/Encoding, changing the encoding selection, and entering "OK".   ( I find the new encoding "sticks" --to the subsequent  times the file is opened-- when changed by this manual method even  though there is no visible indication of the encoding.) Perhaps "command extension-driven" isn't the right terminology, but it is the best I can do with the material in the introduction of the relevant documentation, the Adobe Dreamweaver CS3 API Reference and Adobe Dreamweaver CS3: Extending Dreamweaver.
    Fourth, I should have asked where people who do this kind of work congregate these days.  When I posted I had spent some time looking for an DW extensions forum, but some of the links to it were dead and I incorrectly concluded that the forum had disappeared.  Just now I re-checked and found I totally overlooked this official forum
          http://forums.adobe.com/community/dreamweaver/dreamweaver_extensions
    This is where I should have posted.   No need to continue here, thanks, I will re-post my corrected query there.
    Thanks,
    hen3ry

  • Utf8 script and sqlplus

    Hello.
    Try to use sql script in utf8 encoding to run from sqlplusw oracle 9201 win. Database encoding is BLT8MSWIN1257, client registry contatins the same BLT8MSWIN1257
    SQL> @c:\temp\db\define.sql -- file define.sql has UTF8 encoding
    SP2-0734: unknown command beginning "-- Пе..." - rest of line ignored.
    Is it because of non-utf8 database encoding or sqlplusw does not read utf8 files at all?
    Regards, Dmitry

    Dont know whether sqlplusw supports utf-8, but if the input really is in this encoding I would set nls_lang=.UTF8 (no dash). This would, in theory, tell Sql*plus that your terminal or files uses utf-8.
    Note that with a setup you describe, with client side and database using the same character set, called passed-through setup, you have to make sure that characters really conform to win-1257. Any invalid characters will be incorrectly stored in the database. Storing multi-byte characters in this case, would be one example where things could go wrong.

Maybe you are looking for

  • Why does iTunes on my Macbook Pro crash when I plug in my iPod Nano or Classic to sync?

    When I plug my iPod Nano or Classic into my MacBook Pro, with iTunes already open, it crashes iTunes.  Plus, the device doesn't show up in the device column on the left, but on the upper right of the desktop.

  • LCDS web service call throwing error for valid XSD URL

    Hi, I am trying to call a web service which is deployed on a J2EE application[ Project name : WebServiceApplication ] through a different LCDS application [ Project name : lcdsTestWebService] But while loading of mxml following error comming into con

  • AIR 14 and Flash Builder 4.7!!!

    I cant seem to find any documentation on this anywhere so I think I will have to just hit Adobe up directly I am running Flash Builder 4.7 on a MAC running Mavericks ( OSX 10.9.3 ). Do I have to update both this folder  (Referring to this as Folder 1

  • Macbook air 13, waking from sleep VERY slowly.

    After I open the lid on my MBA the screen awakens nearly instantly, but the mouse cursor does not appear for 5-7 seconds. Then after it finally does appear it remains unresponcive for another 5-10 seconds after that. Some times it can take my compute

  • Control transfer from switch activity to HumanWorkflow

    Hi, I have a HumanWorkflow (LoanTask), based on the outcomes (APPROVE, REJECT, MOREINFO) I have a switch activity branches. From MOREINFO branch I want to transfer the control back to start of (LoanTask) human workflow. Scenario: Whenever an approver