Encoding XML in ISO-8859-1 from a unicode system

Hello
I want to generate an XML with an encoding ISO-8859-1. I'm on a unicode platform.
I've done the following program :
It works well with the line 'encoding UTF-16.
With the line encoding 'encoding ISO ...', I have special  characters in the sting xml_string.
NB : The program works correctly on a non-unicode platform.
Can you help me ?
Thank you
REPORT .
DATA : xml_string TYPE string.
DATA : BEGIN OF l_id,
         numero(10),
         systeme   TYPE gsval,
         date      TYPE d,
         heure     TYPE uzeit,
         type(7),
         nb_nid TYPE i,
       END OF l_id.
DATA: ixml            TYPE REF TO if_ixml,
      streamfactory   TYPE REF TO if_ixml_stream_factory,
      encoding        TYPE REF TO if_ixml_encoding,
      ixml_ostream    TYPE REF TO if_ixml_ostream.
START-OF-SELECTION.
  l_id-date    = sy-datum.
  l_id-heure   = sy-uzeit.
  l_id-type    = 'BATCH'.
  ixml = cl_ixml=>create( ).
  streamfactory = ixml->create_stream_factory( ).
  ixml_ostream = streamfactory->create_ostream_cstring( xml_string ).
  encoding = ixml->create_encoding( character_set = 'ISO-8859-1' byte_order = 0 ).
encoding = ixml->create_encoding( character_set = 'UTF-16' byte_order = 0 ).
  ixml_ostream->set_encoding( encoding = encoding ).
  CALL TRANSFORMATION ztest_xml
        SOURCE id   = l_id
        RESULT XML ixml_ostream.
  BREAK-POINT.

Forum rules say: no mail (we must share the solution)
I didn't understand what was exactly his issue, and what he exactly meant by "then to convert with the good encoding".
His first sentence means that he used the following program (using Xstring instead of string):
REPORT .
DATA : xml_xstring TYPE xstring.
DATA : BEGIN OF l_id,
numero(10),
systeme TYPE gsval,
date TYPE d,
heure TYPE uzeit,
type(7),
nb_nid TYPE i,
END OF l_id.
DATA: ixml TYPE REF TO if_ixml,
streamfactory TYPE REF TO if_ixml_stream_factory,
encoding TYPE REF TO if_ixml_encoding,
ixml_ostream TYPE REF TO if_ixml_ostream.
START-OF-SELECTION.
l_id-date = sy-datum.
l_id-heure = sy-uzeit.
l_id-type = 'BATCH'.
ixml = cl_ixml=>create( ).
streamfactory = ixml->create_stream_factory( ).
ixml_ostream = streamfactory->create_ostream_xstring( xml_xstring ).
encoding = ixml->create_encoding( character_set = 'ISO-8859-1' byte_order = 0 ).
ixml_ostream->set_encoding( encoding = encoding ).
CALL TRANSFORMATION id
SOURCE id = l_id
RESULT XML ixml_ostream.
* in debug here, you'll see that xml_xstring contains
* XML result in ISO-8859-1 encoding
BREAK-POINT.

Similar Messages

  • How to get ISO-8859 characters from DOM ?

    Hi,
    I have problems to get the ISO-8859 characters from the DOM. I parse a XML file and read the values from the DOM. All "umlauts" are scrambled.
    The details:
    The first line of the XML file is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    It contains lines like:
    <tag>Dpfel</tag>
    I perform the following steps:
    I'm parsing the XML file ...
    xmlparser.parse( parser, full_fname_xml );
    ... get the document ...
    doc := xmlparser.getDocument( parser );
    ... and read the value from the TEXT_NODE:
    nodevalue := xmlparser.getNodeValue( node );
    And here is the problem: nodevalue does
    not contain 'Dpfel' but '?pfel'.
    Its not a problem of the database. Explizit INSERTs with "umlauts" e.g. are working fine.
    This problem occurs with the XML Parser for PLSQL 1.0.0.1.0 on NT.
    [Pls do not recommend to use the newer version. I did a test with the newer version and know it works there.]
    My questions relates only to this older version:
    Will it never work with this version
    or what am I doing wrong ?
    Any hints welcome !
    Tnx
    Franz
    null

    Tnx for the quick answer.
    Sorry, indeed I can not use the newer
    version in the moment.
    So I urgently need a solution or any
    workaround for this version.
    F.

  • SPA504G SPA514G Default Character Encoding stay in ISO-8859-1

    Hi,
    I have configure like:
      <Dictionary_Server_Script ua="na">serv=http://{{ provisioning.server }}/telecom/language/;d0=English;x0=spa50x_30x_en_v754.xml;d1=French;x1=spa50x_30x_fr_v754.xml;</Dictionary_Server_Script>
      <Language_Selection ua="na">French</Language_Selection>
      <Default_Character_Encoding ua="na">UTF-8</Default_Character_Encoding>
      <Locale ua="na">fr-FR</Locale>
    Dictionary and Provisioning Profile are encoded in UTF-8.
    but when the phone start after provisioning the Default_Character_Encoding set to ISO-8859-1
    and the lines labels are misprinted.
    Ligne 1
    Ligne 2
    Olivier
    Françoise
    instead of
    Ligne 1
    Ligne 2
    Olivier
    Françoise
    Any idea ?

    I got an answer from the developer.
    Pasted here.
    I think the default encoding is set back to ISO8859 after customer download the dictionary.
    Here is the reason: after 7.5.3, SPA 50x will parse the trkLocaleName in dictionary, for French it will set the phone’s default encoding to iso8859-1 since it is good to French.
    French
    =================================
    •1.         If the customer want to use UTF-8 after xml downloading, please modify the trkLocaleName in the French dictionary xml as following:
    croatian
    It is a workaround, but it's strange why French user will use UTF8. Thanks.
    •2.         Another way is that user can manually set the default encoding value to UTF-8 after xml downloading.

  • Encoding autodetection chooses ISO-8859-5 instead of UTF-8

    A certain site producing HTML in UTF-8 without meta tags. The Firefox detects the encoding as ISO-8859-5, an absolutely dead and useless 'standard'. How to exclude it from the autodetection and maki it proper unicode?

    It's a strange guess, if it's a guess. Are you sure the server isn't sending a header specifying that encoding? To view the content-type header, you can use an add-on (or if it's not a secure page, an external proxy):
    * Live HTTP Headers extension: https://addons.mozilla.org/en-us/firefox/addon/live-http-headers/
    * Firebug extension: https://addons.mozilla.org/en-US/firefox/addon/firebug/
    * Fiddler debugging proxy: http://www.fiddler2.com/fiddler2/

  • Error(3): Invalid encoding specified, expecting ISO-8859-1, got windows-125

    What to do about this??Don't know why this isn't working even when I change the charset to ISO-8859-1in my code file,,,what's the solution??please help here.....

    I was missing the pageEncoding parameter in my included line but even after having included it it's giving me this error msg,
    " Error: recursive include directive "
    I just feel some conflict might be arising between my code file and web.xml.The web.xml file's code is:-
    <?xml version = '1.0' encoding = 'ISO-8859-1'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <jsp-config>
         <jsp-property-group>
         <url-pattern>*.jsp</url-pattern>
         <include-prelude>/header2.jsp</include-prelude>
         <include-coda>/footer2.jsp</include-coda>     
         </jsp-property-group>
    </jsp-config>
    </web-app>
    -----------------------------------------------------------------------------------------------

  • Any Other "standard encoding  character Like ISO 8859-1 "

    hi all
    Can any body suggest some standard sncoding character set like
    ISO-8859-1 .
    Its giving some problem.
    Its not replacing "Space" with %20.
    Thanks

    see what i am doing here is first getting the default URL and then appended some parameter like msgtxt="BAL SO000IN" with the URL.
    to encode this "space" i am using
    EncodingUtil.formUrlEncode(nameValuePairs,Constants.ISO_8859_1);
    But the the Http not supporting this type of charcter encode formar
    like ISO 8859_1

  • Creating RFC Destination For UNICODE system From NON-UNICODE system

    hi
    how can i create RFC Destination For UNICODE system( XI ) From NON-UNICODE (R/3) system.
    thanks and regards
    Mithlesh Kumar Jha

    Hi,
    Check these blogs , Hope u would be getting some idea
    <b>/people/thomas.jung3/blog/2004/06/24/bsp-150-a-developer146s-journal-part-v-xml-for-rfcs
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices
    /people/sap.user72/blog/2004/06/19/how-i-started-with-sap-web-development</b>
    Regards,
    Sridhar Reddy

  • Encoding UTF-8; ISO 8859-1

    Hello,
    It`s a big problem for me, but i think just simple for You.
    I get a String, which i want to write into a file with ISO-88591-;
    I don`t know with which encoding it was created;
    I know a String in Java is alway in unicode; is this unicode always the same, no matter of which encoding the former byte-stream was ??
    How can I find out the former encoding ??
    Thank You very much for your answer...

    As you said, String are Unicode in Java. Period. You can not know the encoding of the byte stream that was used to create it or will be used to store it...
    You problem lies here : "I get a String". Where is it coming from? Was it well created (ie was the right encoding specified when creating the String) ?

  • How to set the Xml Encoding ISO-8859-1 to Transformer or DOMSource

    I have a xml string and it already contains an xml declaration with encoding="ISO-8859-1". (In my real product, since some of the element/attribute value contains a Spanish character, I need to use this encoding instead of UTF-8.) Also, in my program, I need to add more attributes or manipulate the xml string dynamically, so I create a DOM Document object for that. And, then, I use Transformer to convert this Document to a stream.
    My problme is: Firstly, once converted through the Transformer, the xml encoding changed to default UTF-8, Secondly, I wanted to check whether the DOM Document created with the xml string maintains the Xml Encoding of ISO-8859-1 or not. So, I called Document.getXmlEncoding(), but it is throwing a runtime error - unknown method.
    Is there any way I can maintain the original Xml Encoding of ISO-8859-1 when I use either the DOMSource or Transformer? I am using JDK1.5.0-12.
    Following is my sample program you can use.
    I would appreciate any help, because so far, I cannot find any answer to this using the JDK documentation at all.
    Thanks,
    Jin Kim
    import java.io.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Attr;
    import org.xml.sax.InputSource;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Templates;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    public class XmlEncodingTest
        StringBuffer xmlStrBuf = new StringBuffer();
        TransformerFactory tFactory = null;
        Transformer transformer = null;
        Document document = null;
        public void performTest()
            xmlStrBuf.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n")
                     .append("<TESTXML>\n")
                     .append("<ELEM ATT1=\"Yes\" />\n")
                     .append("</TESTXML>\n");
            // the encoding is set to iso-8859-1 in the xml declaration.
            System.out.println("initial xml = \n" + xmlStrBuf.toString());
            try
                //Test1: Use the transformer to ouput the xmlStrBuf.
                // This shows the xml encoding result from the transformer which will change to UTF-8
                tFactory = TransformerFactory.newInstance();
                transformer = tFactory.newTransformer();
                StreamSource ss = new StreamSource( new StringBufferInputStream( xmlStrBuf.toString()));
                System.out.println("Test1 result = ");
                transformer.transform( ss, new StreamResult(System.out));
                //Test2: Create a DOM document object for xmlStrBuf and manipulate it by adding an attribute ATT2="No"
                DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = dfactory.newDocumentBuilder();
                document = builder.parse( new StringBufferInputStream( xmlStrBuf.toString()));
                // skip adding attribute since it does not affect the test result
                // Use a Transformer to output the DOM document. the encoding becomes UTF-8
                DOMSource source = new DOMSource(document);
                StreamResult result = new StreamResult(System.out);
                System.out.println("\n\nTest2 result = ");
                transformer.transform(source, result);
            catch (Exception e)
                System.out.println("<performTest> Exception caught. " + e.toString());
        public static void main( String arg[])
            XmlEncodingTest xmlTest = new XmlEncodingTest();
            xmlTest.performTest();
    }

    Thanks DrClap for your answer. With your information, I rewrote the sample program as in the following, and it works well now as I intended! About the UTF-8 and Spanish charaters, I think you are right. It looks like there can be many factors involved on this subject though - for example, the real character sets used to create an xml document, and the xml encoding information declared will matter. The special character I had a trouble was u00F3, and somehow, I found out that Sax Parser or even Document Builder parser does not like this character when encoding is set to "UTF-8" in the Xml document. My sample program below may not be a perfect example, but if you replaces ISO-8859-1 with UTF-8, and not setting the encoding property to the transfermer, you may notice that the special character in my example is broken in Test1 and Test2. In my sample, I decided to use ByteArrayInputStream instead of StringBufferInpuptStream because the documentation says StringBufferInputStream may have a problem with converting characters into bytes.
    Thanks again for your help!
    Jin Kim
    import java.io.*;
    import java.util.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Attr;
    import org.xml.sax.InputSource;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Templates;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    * XML encoding test for Transformer
    public class XmlEncodingTest2
        StringBuffer xmlStrBuf = new StringBuffer();
        TransformerFactory tFactory = null;
        Document document = null;
        public void performTest()
            xmlStrBuf.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n")
                     .append("<TESTXML>\n")
                     .append("<ELEM ATT1=\"Resoluci�n\">\n")
                     .append("Special charatered attribute test")
                     .append("\n</ELEM>")
                     .append("\n</TESTXML>\n");
            // the encoding is set to iso-8859-1 in the xml declaration.
            System.out.println("**** Initial xml = \n" + xmlStrBuf.toString());
            try
                //TransformerFactoryImpl transformerFactory = new TransformerFactoryImpl();
                //Test1: Use the transformer to ouput the xmlStrBuf.
                tFactory = TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer();
                byte xmlbytes[] = xmlStrBuf.toString().getBytes("ISO-8859-1");
                StreamSource streamSource = new StreamSource( new ByteArrayInputStream( xmlbytes ));
                ByteArrayOutputStream xmlBaos = new ByteArrayOutputStream();
                Properties transProperties = transformer.getOutputProperties();
                transProperties.list( System.out); // prints out current transformer properties
                System.out.println("**** setting the transformer's encoding property to ISO-8859-1.");
                transformer.setOutputProperty("encoding", "ISO-8859-1");
                transformer.transform( streamSource, new StreamResult( xmlBaos));
                System.out.println("**** Test1 result = ");
                System.out.println(xmlBaos.toString("ISO-8859-1"));
                //Test2: Create a DOM document object for xmlStrBuf to add a new attribute ATT2="No"
                DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = dfactory.newDocumentBuilder();
                document = builder.parse( new ByteArrayInputStream( xmlbytes));
                // skip adding attribute since it does not affect the test result
                // Use a Transformer to output the DOM document.
                DOMSource source = new DOMSource(document);
                xmlBaos.reset();
                transformer.transform( source, new StreamResult( xmlBaos));
                System.out.println("\n\n****Test2 result = ");
                System.out.println(xmlBaos.toString("ISO-8859-1"));
                //xmlBaos.flush();
                //xmlBaos.close();
            catch (Exception e)
                System.out.println("<performTest> Exception caught. " + e.toString());
            finally
        public static void main( String arg[])
            XmlEncodingTest2 xmlTest = new XmlEncodingTest2();
            xmlTest.performTest();
    }

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • How to set codepage iso-8859-1 in output XML?

    Dear experts,
    I want to create an XML file with codepage "iso-8859-1" from PI 7.11.
    I have already tried to put the filetype to TEXT and ISO-8859-1 in the File Encoding field of my receiving CC (using the FTP adapter), but I still get an xml in codepage UTF-8.
    It should also be possible to realise this via an XSL mapping, but where do I have to do this? Or is there any other way to use codepage ISO-8859-1?
    Thanks in advance,
    William

    Hi
    You can do this change at Visual Administrator level. There are some parameters you need to edit and add IS0-8859, so that Integration engine will set for that encode.
    So, you can ask the Basis guys to perform this.
    This would certainly works out for you.
    Regards
    Pothana

  • How to determine codepage ISO-8859-1 for my output XML?

    Dear experts,
    I want to create an XML file with codepage "iso-8859-1" from PI 7.11.
    I have already tried to put the filetype to TEXT and ISO-8859-1 in the File Encoding field of my receiving CC (using the FTP adapter), but I still get an xml in codepage UTF-8.
    It should also be possible to realise this via an XSL mapping, but where do I have to do this? Or is there any other way to use codepage ISO-8859-1?
    Thanks in advance,
    William

    Hi William,
    Write a simple XSLT mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT map as the second mapping step in your interface mapping.
    First step in your interface mapping will be your already existing message mapping.
    Here is the XSL code !
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
    <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>
    Hope you can solve now ...if not pls let us know ! 
    cheers,
    Ram.

  • Codepage coverting error utf-8 from System codepage to iso-8859-1 (PI 7.1)

    Hello Experts,
    In our Prcess, we receive an Idoc from an IS-U system and then we send this Idoc with some Header-Information via http-Adapter to a Seeburger System.
    In the outbound communication Channel we have a XI Payload manipulation with xml-Code iso-8859-1.
    We get the Error: Codepage coverting error utf-8 from System codepage to iso-8859-1, and only for this Idoc, where othe similar Idocs runs correctly.
    Is it possible, that the Idoc contains non-utf-8 chars so the error occurs?
    PS: another XI in our landscape uses a http-Channel with the same configuration in a similar process, an it work, so guess the Problem is not in the communication channel.
    thanks,
    best regards

    > Is it possible, that the Idoc contains non-utf-8 chars so the error occurs?
    A would rather think, that there could be any non-iso-8859-1 character be in the IDoc. For example an czech or polish character.

  • File adapter ISO-8859-1 encoding problems in XI 3.0

    We are using the XI 3.0 file adapter and are experiencing some XML encoding troubles.
    A SAP R/3 system is delivering an IDoc outbound. XI picks up the IDoc and converts it to an external defined .xml file. The .xml file is send to a connected ftp-server. At the remote FTP server the file is generating an error, as it is expected to arrive in ISO-8859-1 encoding. The Transfer Mode is set to Binary, File Type Text, and Encoding ISO-8859-1.
    The .xml file is encoded correctly in ISO-8859-1, but the problem is that the XML encoding declaration has the wrong value 'UTF-8'.
    Does anybody know of a work around, to change the encoding declaration to ‘ISO-8859-1’ in the message mapping program?

    An example of the XSL code might be as follow:
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
         <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>

  • Creating XML-files in ABAP with format ISO-8859-1 after the use of unicode

    Hello,
    We have a problem with XML-files created in z_abap-programma.
    Before the use of unicode the XML-file was of the format: ISO-8859-1.
    After the introducting of unicode the format is UTF-16.
    In the abap-program we are using:
            CALL TRANSFORMATION xls-program
             SOURCE t_vbak = it_vbak
             RESULT XML xmlstring.
            CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
              EXPORTING
                text     = xmlstring
              IMPORTING
                buffer   = lx_xml_as_string.
            CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
              EXPORTING
                buffer        = lx_xml_as_string
              IMPORTING
                output_length = li_xml_size
              TABLES
                binary_tab    = ltb_xml_table.
            CALL METHOD cl_gui_frontend_services=>gui_download
              EXPORTING
                bin_filesize = li_xml_size
                filename     = lc_filename
                filetype     = 'BIN'
              CHANGING
                data_tab     = ltb_xml_table
              EXCEPTIONS
                OTHERS       = 24.
    Is it prossible to create the XML-file with the format ISO-8859-1 after the unicode, please can you explane how to solve this problem.
    Regards,
    Theo Pijlman

    hi theo,
    did you read my thread i wrote some days before ? have a look in my sample coding find   " if_ixml_encoding ..... " there you can set the encoding of character .
    greetz
    tony
    thread:
    Re: abap to xml
    SAP Explanation for Interface if_ixml_encoding :
    http://help.sap.com/saphelp_nw04/helpdata/de/bb/5766a6dca511d4990b00508b6b8b11/content.htm

Maybe you are looking for

  • [SOLVED] Can't Start MySQL after upgrading to 5.1.41-3

    I can't start mysqld with 'mysqld start'.Here is my mysqld output: [ahao@sky ~]$ mysqld start 091125 18:33:48 [Note] Plugin 'FEDERATED' is disabled. 091125 18:33:48 [Note] Plugin 'ndbcluster' is disabled. 091125 18:33:48  InnoDB: Started; log sequenc

  • Shouldn't the update be free if I have Lion?

    I'm being asked to pay $14.99 for the update. I got Lion as soon as it came out. Shouldn't it include updates to iPhoto?

  • Page size in pdf

    I converted a 1/4 page Word doc into .pdf but got converted as a full page.  I want it converted as the same 1/4 page.  How can I do that?

  • Lightroom 3 preview Question

    When I have the external drive that contains my pictures disconnected from my laptop I can see some of the pictures in the Library module but not all of them.  Some are just gray squares.  What is the difference?  I want to be able to see them all wh

  • Efficient Way to output this data, don't want to use evaluate

    Hey everyone, I have a form that creats field names with dynamic names, basically just a name like "Box" with a counter at the end so you end up with "Box1" "Box2" "Box3". How can I easily output all the information contained in this form, since I wo