StAX parser does not handle UTF-8 byte order mark

Hello,
i am playing around with the reference implementaion of the StAX API using the XMLStreamReader.
When i parse UTF-8 encoded xml files with the UTF-8 byte order mark i get the following exception when the method next() is called on the reader instance:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,7]
Message: processing instruction can not have PITarget with reserveld xml name
     at com.bea.xml.stream.MXParser.parsePI(MXParser.java:2734)
     at com.bea.xml.stream.MXParser.parseProlog(MXParser.java:1775)
     at com.bea.xml.stream.MXParser.nextImpl(MXParser.java:1717)
     at com.bea.xml.stream.MXParser.next(MXParser.java:1180)
The XMLStreamReader is created on a FileInputStream.
When parsing xml's without a byte order mark, parsing works without any problems.
Any idea how to solve this problem, or is this an internal problem of the StAX implementation.
Thanks for help.
Jörg Eichhorn

Issue related to handling the BOM were fixed as part of the 10g project which added NLS Support to the protocols. I just verified that an UTF8 file containing BOM is correctly processed via FTP in 10.1.0.2.0

Similar Messages

  • UNICODE Byte Order Marker at beginning of text files

    Hi,
    I'm running in to problems when reading text from a number of text files, some of which are plain US-ASCII text and others which are also plain US-ASCII content but contain a UNICODE UTF-8 Byte Order Mark at the beginning of the file i.e. the bytes 0xEF 0xBB 0xBF.
    I open each file using standard :
    InputStream fis = new FileInputStream(fileName);
    Reader fileReader = new InputStreamReader(fis);
    However, in those cases where a BOM is present, the first 3 characters of my stream are the BOM above which I would have expected to have been automatically stripped. When I set the encoding in the InputStreamReader I still get a single garbage character, whereas when I perform above with UTF-16 I get only the files chars as expected.
    Do I need to open this file as a byte stream and check the BOM myself and then derive the type of encoding I should be opening the file with? And if so, for UTF-8 I also then must discard the first 3 bytes?
    Please help as I don't want to have to do this if possible and I hope someone can understand my problem.
    My JVM environment is 1.4.2 on XP.
    Many THanks,
    Henry

    Probably not. Some of the Unicode encoding types... the list is here:
    http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
    support the BOM, so you'd only need to know that it's UnicodeBig or UnicodeLittle or whatever it really is.
    Of course, if you don't know what it is, that is a problem. You can probably assume the BOM bytes are actually that, but technically, you can't generally infer any particular encoding type by just reading the file. I mean, who's to say that a file is UTF-8 encoded or ISO8859-1? Yes, if it is UTF-8, and it includes chars that are of multi-byte sets (Chinese, for example), then many characters, if read as ISO8859-1, would look on screen like gibberish. But from the standpoint of reading a file at the character level, Java doesn't care and can't know.
    So to really know, you would either have to know ahead of time what the encoding is, or do some analysis of the data to see if it's likely 1 or the other, which is probably hard to do cuz it would require some sort of natural language knowledge.

  • Byte Order Mark (BOM) not found in UTF-8 file download from XI

    Hi Guys,
    Facing difficulty in downloading file from XI in UTF-8 format with byte order mark.
    Receiver File adapter has been configured to download the file in UTF-8 file format. But the byte order mark is missing. Same works well for UTF-16. Could see the byte order mark at the beginning of  file "FEFF" for UTF-16BE - Unicode big endian.
    As per SAP help, UTF-8 supposed to be the default encoding for TEXT file type.
    Configuring the Receiver File/FTP Adapter in the SAP help link.
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    Could you please advice on how to achieve BOM in UTF-8 file as it is very important for the outbound file to get loaded in our vendor system.
    Thanks.
    Best Regards
    Thiru

    Hi!<br>
    <br>
    Had the same problem. But here, we create a "CSV"-File which must have the BOM otherwise it will not be recogniced as UTF-8.
    <br>
    Therefore I've done the folowing:
    Created a simple destination-structure which represents the CSV and done the mapping with the graphical-mapper. The destination-Structure looks like:
    <br>
    (?xml version="1.0" encoding="UTF-8"?)<br>
    (ONLYLINES)<br>
         (LINE)<br>
              (ENTRY)Hello I'm line 1(/ENTRY)<br>
         (/LINE)<br>
         (LINE)<br>
              (ENTRY)and I'm line 2(/ENTRY)<br>
         (/LINE)<br>
    (/ONLYLINES)
    As you can see, the "ENTRY"-Element holds the data.<br>
    <br>
    Now I've created the folowing Java-Mapping and added that mapping within the Interface-Mapping as second step after the graphical mapping:<br>
    <br>
    ---cut---<br>
    package sfs.biz.xi.global;<br>
    <br>
    import java.io.InputStream;<br>
    import java.io.OutputStream;<br>
    import java.util.Map;<br>
    <br>
    import javax.xml.parsers.DocumentBuilder;<br>
    import javax.xml.parsers.DocumentBuilderFactory;<br>
    <br>
    import org.w3c.dom.Document;<br>
    import org.w3c.dom.Element;<br>
    import org.w3c.dom.NodeList;<br>
    <br>
    import com.sap.aii.mapping.api.StreamTransformation;<br>
    import com.sap.aii.mapping.api.StreamTransformationException;<br>
    <br>
    public class OnlyLineConvertAddingBOM implements StreamTransformation {<br>
    <br>
         public void execute(InputStream in, OutputStream out) throws StreamTransformationException {<br>
              try {<br>
                   byte BOM[] = new byte[3];<br>
                   BOM[0]=(byte)0xEF;<br>
                   BOM[1]=(byte)0xBB;<br>
                   BOM[2]=(byte)0xBF;<br>
                   String retString=new String(BOM,"UTF-8");<br>
                   Element ServerElement;<br>
                   NodeList Server;<br>
                   <br>
                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();<br>
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();<br>
                Document doc = docBuilder.parse(in);<br>
                doc.getDocumentElement().normalize();<br>
                NodeList ConnectionList = doc.getElementsByTagName("ENTRY");<br>
                int count=ConnectionList.getLength();<br>
                for (int i=0;i<count;i++) {<br>
                    ServerElement = (Element)ConnectionList.item(i);<br>
                    Server = ServerElement.getChildNodes();<br>
                    retString += Server.item(0).getNodeValue().trim() + "\r\n";<br>
                }<br>
                <br>
                out.write(retString.getBytes("UTF-8"));<br>
                   <br>
              } catch (Throwable t) {<br>
                   throw new StreamTransformationException(t.toString());<br>
              }<br>
         }<br>
    <br>
         public void setParameter(Map arg0) {<br>
              // TODO Auto-generated method stub<br>
              <br>
         }<br>
    <br>
    /*<br>
         public static void main(String[] args) {<br>
              File testfile=new File("c:\\instance.xml");<br>
              File testout=new File("C:\\testout.txt");<br>
              FileInputStream fis = null;<br>
              FileOutputStream fos= null;<br>
              OnlyLineConvertAddingBOM myFI=new OnlyLineConvertAddingBOM();<br>
              try {<br>
                    fis = new FileInputStream(testfile);<br>
                     fos = new FileOutputStream(testout);<br>
                    myFI.setParameter(null);<br>
                    myFI.execute(fis, fos);<br>
              } catch (Exception e) {<br>
                   e.printStackTrace();<br>
              }<br>
                    <br>
                    <br>
         }<br>
         */<br>
    <br>
    }<br>
    --cut---
    <br>
    This Mapping searches all "ENTRY"-Tags within the XML-Strucure and creates a big string which startes with the UTF-8-BOM and than combined each ENTRY-Element, separated by CR/LF.<br>
    <br>
    We use this as Payload for an Mail-Adapter (sending via SMTP) but it should also work on File-Adapter.<br>
    <br>
    Hope it helps.<br>
    Rene<br>
    <br>
    Besides: could someone tell SAP that this editor is the WORSEST editor I've ever seen. Maybe this guys should copy somethink from wikipedia :-((
    Edited by: Rene Pilz on Oct 8, 2009 5:06 PM

  • Tomcat7. This parser does not support specification null version null

    Hi guys,
    I try to run a web application on oracle linux, tomcat 7 and jdk1.7 and I get an exception on first page load after tomcat restart. The exception occurs only at first application pageload. Application is developed on jdk1.6 and on a server is installed jdk1.4-compact and jdk1.7 but I entered jdk1.7 path to JAVA_HOME and JRE_HOME in tomcat/bin/setclasspath.sh file. Any ideas why I am getting this exception?
    Jan 03, 2012 5:11:28 PM org.apache.catalina.startup.Catalina startINFO: Server startup in 10261 ms
    Jan 03, 2012 5:15:49 PM org.apache.commons.digester.Digester getParser
    SEVERE: Digester.getParser:
    java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
         at javax.xml.parsers.SAXParserFactory.setSchema(SAXParserFactory.java:419)
         at org.apache.commons.digester.Digester.getFactory(Digester.java:541)
         at org.apache.commons.digester.Digester.getParser(Digester.java:791)
         at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1068)
         at org.apache.commons.digester.Digester.parse(Digester.java:1916)
         at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:329)
         at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(BaseLocaleUrlDefinitionDAO.java:276)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:251)
         at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
         at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
         at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
         at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
         at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:222)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:204)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:154)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:123)
         at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:54)
         at org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:105)
         at org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:364)
         at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:618)
         at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
         at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
         at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
         at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
         at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
         at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
         at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
         at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
         at java.lang.Thread.run(Thread.java:722)

    is null statement is post processed. This means in case of a select ALL records from the remote database are fetched into the Oracle database and the is null statement is then processed locally in the Oracle db.
    So thze select will work as it is handled internally in the Oracle database. This also means as But "is null" isn't sent to the foreign MySQL db the update clause will fail with ORA-02070: database PLAZAHOST does not support IS NULL in this context
    You need to recode the statement or use passthrough statements.

  • SAP integration kit - MDX parser does not exist

    Hi,
    While running a query via Web Intelligence, during the process where data should be retrieved, the error pops up that RFC destination MDX PARSER does not exist.
    The universe is built on an infoCube without intermediate BEx query.
    I know about the existence of note 1032461, but it didnu2019t get us further:
    -     Librfc32.dll (the one included during KIT installation) is at the right place.
    -     MDX BW Driver was included in transports.
    -      A RFC connection test via sm59 was positive.
    Anybody who had same error or having tips?
    All help would be highly appreciated since this should be fixed asap.
    Here some additional questions:
    1)     why program mdxsvr is listed in unix directory (visible via al11), and not on BO server site?
    2)     The librfc32.dll file included in the installation has a lower patch number then the patch number when downloading from sap marketplace.
    Is this important even when Patch Level is the same? So still necessary to change this file with version separately downloaded?
    3)     Is it necessary that MDX is added to the BW internet communication framework (transaction SICF  sap  bw  bex, Mime, xml, and also MDX necessary?)
    4)     Should the BW system be added to the broadcasting availability (spro)?
    5)     Could this indicate a problem with the java connector?
    6)     We created a RFC connection following the advice about BO-BW connection. But, is there need of an additional connection called u2018MDX Parseru2019. If yes, where do I find info how-to?
    Here the full error:
    A database error occured. The database error text is: The MDX query SELECT {  } ON COLUMNS , [0COMP_CODE].[LEVEL00].MEMBERS DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM [ZCO_PA_2/ZCOPA_DAILY_AGGR] SAP VARIABLES [0P_FPER] INCLUDING [0FISCPER].[K42010001] [ZCURR1] INCLUDING [0CURRENCY].[EUR] failed to execute with the error Error occurred when starting the parser: RFC destination MDX PARSER does not exist.. (WIS 10901)

    Hi,
    hhmm - i can still see it and status is "released to customers"
    If you have a S-User and pwd use this link:
    https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3132363135303726
    Regards
    -Seb.

  • Error Parser does not work, even in SSX3

    SunSudio Express (December 2006 release) introduces some interesting new features, but there are still problems. For the first time, I was able to debug Fortran 90 applications in Linux, but debugging is still very limited. Furthermore, the Fortran error parser does not work, even when compiling using Sun's f95 compiler. This is a heavy disadvantage. I assume that Fortran error parsing is not supported on Linux, although the tutorials don't make this point clear: In the Options window, there are settings concerning C/C++ (and its parser), but there are no similar options for the Fortran parser, even in "Advanced Setings" (which are similar to the old Options window). My Linux system is Debian 3.1 (Sarge), with JDK 1.5.0.09.
    I don't think that I'm doing something wrong, but I want to ask, just to be sure: has someone had seen the Fortran error parser working on Linux? What about Fortran word completion?

    SunSudio Express (December 2006 release) introduces some
    interesting new features, but there are still problems. For the first time,
    I was able to debug Fortran 90 applications in Linux, but debugging is
    still very limited. This is good to know that you were able to debug a f90 application
    on Linux. What problems do you see? Please, report them, and we
    will file them as bugs or RFEs (requests for enhancements).
    Furthermore, the Fortran error parser does not work, even when
    compiling using Sun's f95 compiler. Yes, you are right, this feature does not work yet.
    This is a heavy disadvantage. I assume that Fortran error parsing
    is not supported on Linux, although the tutorials don't make this
    point clear: Yes, it does not work yet on all platforms.
    In the Options window, there are settings concerning C/C++ (and
    its parser), but there are no similar options for the Fortran parser,
    even in "Advanced Settings" (which are similar to the old Options
    window). There will be similar options for Fortran.
    My Linux system is Debian 3.1 (Sarge), with JDK 1.5.0.09.JDK 1.5.0.09 is ok.
    We do not target Debian system, but we assume everything
    should work there (we test on Red Hat and SUSE).
    Good to know that our assumption is correct :-)
    I don't think that I'm doing something wrong, but I want to ask, just
    to be sure: has someone had seen the Fortran error parser working
    on Linux? No. It does not work on Linux, and it does not work on other platforms.
    What about Fortran word completion? No, this feature is not implemented yet.
    Thanks you for trying Sun Studio 12 Express release and for your report.
    Nik

  • I bought and legally own PS CS3. Installed on a desktop and the machine died completely. Downloaded a trial of CS3 from Adobe site. Went to activate and said too many activations. Activate over the phone. EXCEPT Adobe does not handle activation issues ove

    I bought and legally own PS CS3. Installed on a desktop and the machine died completely. Downloaded a trial of CS3 from Adobe site. Went to activate and said too many activations. Activate over the phone. EXCEPT Adobe does not handle activation issues over the phone. Adobe doesn't care about their older products - they don't care that I spent hundreds of dollars for CS3. This is truly disgusting corporate behavior. Is there anything I can do? We aren't all rich photographers. I paid a great deal of money for this product. Is it now useless?Thank you,
    James Scott

    HI James please contact the Adobe Chat Team for activation issue
    kindly do the mentioned steps as follow in order to get hold of chat rep of adobe
    Go to www.adobe.com/getsupport
    select the product as adobe creative suite - then select the issue as adobe id and sign in - and then click on still need help contact us then you will be able to find chat option and they will help you with the chat issue

  • ConvertToClob and byte order mark for UTF-8

    We are converting a blob to a clob. The blob contains the utf-8 byte representation (including the 3-byte byte order mark) of an xml-document. The clob is then passed as parameter to xmlparser.parseClob. This works when the database character set is AL32UTF8, but on a database with character set WE8ISO8859P1 the clob contains an '¿' before the '<'AL32UTF8');
    I would assume that the ConvertToClob function would understand the byte order mark for UTF-8 in the blob and not include any parts of it in the clob. The byte order mark for UTF-8 consists of the byte sequence EF BB BF. The last byte BF corresponds to the upside down question mark '¿' in ISO-8859-1. Too me, it seems as if ConvertToClob is not converting correctly.
    Am I missing something?
    code snippets:
    l_lang_context number := 1;
    dbms_lob.createtemporary(l_file_clob, TRUE);
    dbms_lob.convertToClob(l_file_clob, l_file_blob,l_file_size, l_dest_offset,
                                       l_src_offset, l_blob_csid, l_lang_context, l_warning);
    procedure fetch_xmldoc(p_xmlclob in out nocopy clob,
                                       o_xmldoc out xmldom.DOMDocument) is
    parser xmlparser.Parser;
    begin
      parser := xmlparser.newParser;
      xmlparser.parseClob(p => parser, doc => p_xmlclob);
      o_xmldoc := xmlparser.getDocument(parser);
      xmlparser.freeParser(parser);
    end;The database version is 10.2.0.3 on Solaris 10 x86_64
    Eyðun
    Edited by: Eyðun E. Jacobsen on Apr 24, 2009 8:58 PM

    can this be of some help? http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions027.htm#SQLRF00620
    Regards
    Etbin

  • Accidentally removed from,sharing and permissions the admin user,and now i do not when i find the home icon at my computer i do not have permmission,and the mac does not works properly,lots of question mark at the dock ,please help

    accidentally removed from,sharing and permissions the admin user,and now i do not when i find the home icon at my computer i do not have permmission,and the mac does not works properly,lots of question mark at the dock ,please help

    I'm going to assume that since you deleted your hard drive and all its files, you had a backup, yes? If the backup has an OS (bootable clone), then you can boot into it by holding down the option key when you start up you iMac and choose the backup drive. Then use Carbon Copy Cloner or Super Duper to copy the files back to your iMac.

  • Photoshop Elenents 13 does not recognize my Canon Pixma Pro Mark II 9000 printer.

    Photoshop Elements 13 does not recognize my Canon Pixma Pro Mark II 9000 printer.  I get the following error message “The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available. You will need to check your printer settings before printing” and I cannot print.

    I have been checking my computer files and find that PSE 13 is only the 32 bit system and my computer is a 64 bit system.  In PSE 12 I was able to take the Adobe
    Twain Driver (Twain 32 bit} in to the Optional Plug-in folder and then my Canon Scanner would work with PSE 12.  My printer Canon Pixma Mark II 9000 worked with PSE 12.  Now that I have upgraded to PSE 13 neither the scanner or my printer will work.  There I no “Optional Plug-in Folder” in PSE 13.  Is there some way that I can drag files into PSE 13 that will enable both my scanner and printer to work?  My scanner is a Canon Canoscan 8800.
    Or must I go back to using PSE 12.
    Robbie

  • My MacMini does not stop after giving the order ''switch off''.What can I do?

    My MacMini does not stop after giving the order ''switch off''.
    It stops only, after pushing the button ''on/off'' for some seconds.
    What can I do?
    frahsun

    boot the Mac into safe mode, repair permissions while in it, then reboot normally.
    if that doesn't help, try resetting the System Management Controller (SMC).

  • ESB Routing Service Byte Order Mark error

    Hi,
    I have a esb routing service to accept soap messages from an external system. The external system sents messages with a Byte Order Mark for UTF8 at the start. If i look at the tcp messages i see the following:
    POST /event/DefaultSystem/CaseVerhuizing/EsbStuf0204Service HTTP/1.1
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
    Protocol 2.0.50727.42)
    Content-Type: text/xml; charset=utf-8
    SOAPAction: "http://www.egem.nl/StUF"
    Host: ux920:7777
    Content-Length: 2382
    Expect: 100-continue
    Connection: Keep-Alive
    HTTP/1.1 100 Continue
    ...<?xml version="1.0" encoding="utf-8"?><soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    The three dots signify the hexadecimal value EF BB BF which is for UTF8. This raises an error however in iAS:
    HTTP/1.1 400 Bad Request
    Date: Mon, 16 Jul 2007 14:41:32 GMT
    Server: Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server
    Content-Length: 158
    Connection: close
    Content-Type: text/html; charset=ISO-8859-1
    Bad Request
    Error parsing envelope: (1, 1) Start of root element
    expected
    It seems the esb routing service is trying to parse the Byte Order Mark as xml and therfore can not find the soap envelope tag? Any help is appreciated!
    Kind Regards,
    Andre Jochems
    Message was edited by:
    ajochems

    Hi Andre,
    We got exactly the same error as you did. Your analysis is also correct; the first 3 bytes of the reply are not interpreted by BPEL/ESB as a BOM, but as 'real' characters.
    The problem is due to the fact that the UTF-8 BOM is actually optional in the specifications, and obligatory for UTF-16. The UTF-8 BOM practically has no meaning, and is never used in most SOA applications. However the guys that made the webservice you need to consume are (wrongly) convinced that the UTF-8 BOM is supposed to be there according to the OASIS/W3C specs. Which is not true btw...
    For more info on BOMs, check: http://en.wikipedia.org/wiki/Byte_Order_Mark
    Unfortunately I don't have the code for our 'proxy' service anymore. I remember that we simply made a little servlet, that uses input- and outputstreams. The inputstream then filters the BOM. Remember to also proxy the WSDL to 'rewrite' the endpoint ;-)
    HTH,
    Bas

  • Byte order mark

    I've seen this asked one other time but it wasn't actually answered. In dreamweaver when you are including php files in webpage, such as to create a temple, unicode automatically inserts these byte order marks. In the preferences you can deselect an option that will include the byte order marks, but when they are deselected, they still manage to show up, causing random spaces in your formatting. This is an issue because it overrides the CSS and the characters are hidden until you view your page in a browser or in Live view. If anyone can answer this question it would be greatly appreciated.

    In dreamweaver when you are including php files in webpage, such as to create a temple, unicode automatically inserts these byte order marks.
    That's not my experience.  UTF-8 does not require a BOM.
    Set title and encoding properties for a page
    Nancy O.

  • How can I create files in unicode format without "byte order mark"?

    Hello together,
    I have to export files in UTF-8 format and have to send them to another partner system which works with linux as operating system.
    I have tried the different possibities to create files with ABAP. But nothing works 100% how I want.
    Some examples:
    1.)
    OPEN DATASET [filename] FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
    If I create a file in this way and download it from application server to local system the result for file format in a unicode text edior like NotePad is "ANSI AS UTF-8". This means I have no BYTE ORDER MARK inside.
    But it is also possible that the file format is only ANSI if the file contains no "special characters", isn't it?
    In my test cases I create 3 files. 2 of them has format "ANSI AS UTF-8", and one only "ANSII".
    After transfer to Linux I get as result 2 times UTF8 and one time ASCII as file format.
    2.)
    OPEN DATASET [filename] FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH BYTE ORDER MARK.
    With this syntax the result in local editor looks like ok. I get as format really "UTF-8".
    But I get problems with the system which receives the files.
    All files has the file format UTF-8 on Linux but the interface / script can not read the file with BYTE ORDER MARK.
    This is a very big problem for me.
    Do anybody of you know if it possible to force creation in UTF-8 without a BYTE ORDER MARK?
    This means more or less the first example but all files should have UTF-8 format!
    Thanks in advance
    Christian

    This means it is not possible to create a pure unicode file without the byte order mark?
    You wouldn't happen to know how a file with byte order mark should read on a Linux system?
    Or if this possible or not?
    Regards
    Christian

  • Byte Order Mark and CSV download

    referencing this thread:
    Re: BUG?? UTF-8 non-Latin database chars in IR csv export file not export right
    Is there any way in APEX to incorporate the BOM (Byte Order Mark) to be included within the excel download? Or must I write my own custom excel download to include the BOM?

    referencing this thread:
    Re: BUG?? UTF-8 non-Latin database chars in IR csv export file not export right
    Is there any way in APEX to incorporate the BOM (Byte Order Mark) to be included within the excel download? Or must I write my own custom excel download to include the BOM?

Maybe you are looking for