Convertion from UTF-16 to UTF-8 in XI

Hi,
  From Source system (MDM), sometimes data are coming in UTF-16 format in to XI. My target system is R/3 which is UTF-8. Here's the scenario:-
MDM->MQ Queue-> Local JMS Queue-> XI->R/3
Here I am using sender JMS Queue adapter to receive the data from Local JMS Queue and using receiver IDOC adapter to send the IDOC into R/3. I am using ABAP mapping for this scenario.
  Since the target system in UTF-8 and the data are coming sometimes in UTF-16, how can I change the format UTF-16 to UTF-8 in sender JMS adapter.
Please advice.
Reply with details would be appreciated.
BR
Soumya

Hi Soumya ,
You can do this in Adapter module in JMS sender adapter .
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
XMLPayload xmlpayload = msg.getDocument();               
xmlpayload.getContent()
convert from UTF 16 to UTF 8 then
xmlpayload.setContent();
Hope this works.
Cheers,
Reddy

Similar Messages

  • Pacman: Pathname can't be converted from UTF-8 to current locale

    Hello Forum,
    I am stuck with a problem to which I cannot find any solution after spending half the day trying to solve it:
    I have a package wich I installed from AUR -> MyCustomRepository working nicely on my main Arch system. Now I would like to add the package to a livecd using the archiso scripts. When I add it to my packages.both list it downloads fine.
    However when installation into chroot should start pacman gives me the following error:
    (378/378) loading package files [######################] 100%
    error: error while reading package /var/cache/pacman/pkg/pd-extended-0.43.4-1-x86_64.pkg.tar.xz: Pathname can't be converted from UTF-8 to current locale.
    error: failed to commit transaction (libarchive error)
    Errors occurred, no packages were upgraded.
    My System only uses en_US.UTF-8 as locale, so I don't really understand why any conversion should be neccesary.
    I read about a similar error somewhere with a reply stating it had  to do with packaging. No solution was given however. Can this be the case? And if yes, why do I not have any problems installling in my main system? And more importantly, how can I fix it? i don't really know where to look for the right way now.
    I already tried to include a different packages from AUR through my repository, which worked as expected.
    the package is pd-extended from AUR with a slight modification to make the .desktop file actually start pdextended.
    Any help is greatly appreciated.
    Thank you,
    Dominik
    # Maintainer: <fero dot kiraly at gmail.com>
    # Contributor: Dominik Schmidt-Philipp <[email protected]>
    pkgname=pd-extended
    pkgver=0.43.4
    pkgrel=1
    pkgdesc="PureData Extended 0.43-4 version"
    url="http://puredata.info/"
    arch=('i686' 'x86_64' )
    license=('BSD')
    depends=('libdc1394' 'desktop-file-utils' 'libiec61883' 'fftw' \
    'jack' 'tk' 'freeglut' 'libquicktime' 'libdv' 'gsl' 'imagemagick' \
    'ftgl' 'libgl' 'hicolor-icon-theme' 'lua51')
    makedepends=('dssi' 'git' 'libv4l' 'tcllib' 'subversion' 'swig' 'automake' 'curl')
    conflicts=('pdp' 'zexy' 'puredata')
    provides=( 'pd-extended' 'pd-gem' 'pdp' 'zexy')
    optdepends=('puredata-utils' 'pd-vanilla')
    replaces=(pd-extended)
    backup=()
    options=('!makeflags' '!libtool')
    install=pd-extended.install
    source=('change_gem_configure_file.patch' 's_inter.c.patch' 'tclpd.Makefile.patch' 'makefile.am.patch')
    md5sums=('63a36c51706eaed98611aa4b4bb6ed0d' '8b748d09e8bdf04540ba579d0a6b5318' '463de23166cef2dcf6c7f6989e636213' '5938b12a232004de15f5a383f95cedca' )
    build() {
    unset CFLAGS
    unset LDFLAGS
    unset INCLUDES
    #downloading pd-extended----------------------------------------------------------
    msg "Begin SVN checkout for pd-extended 0.43.4"
    cd $srcdir
    svn checkout https://pure-data.svn.sourceforge.net/svnroot/pure-data/branches/pd-extended/0.43 $pkgname
    msg "SVN checkout done or server timeout"
    cd ..
    #FIXES -----------------------------------------------------------------------------
    # fix #1 lua
    #patch $srcdir/$pkgname/externals/loaders/pdlua/src/Makefile ./repair_lua_lib_number.patch
    #fix #2 -- GEM configure.ac
    patch $srcdir/$pkgname/externals/Gem/configure.ac ./change_gem_configure_file.patch
    #fix #3 -- repair wish8.6 (for tcl8.6)
    patch $srcdir/$pkgname/pd/src/s_inter.c ./s_inter.c.patch
    #fix #4 -- repair version of tcl (8.6)
    patch $srcdir/$pkgname/externals/loaders/tclpd/Makefile ./tclpd.Makefile.patch
    #fix #5 -- repair binary name to pd-extended (from pd)
    #patch $srcdir/$pkgname/packages/Makefile ./program_name.patch
    patch $srcdir/$pkgname/pd/src/Makefile.am ./makefile.am.patch
    # 64 bit archutecure----------------------------------------------------------------
    if [ "$CARCH" = "x86_64" ]; then
    # fix -fPIC issue in PDP
    sed -e "s|CFLAGS =|CFLAGS = -fPIC|" \
    -i $srcdir/$pkgname/externals/pdp/opengl/Makefile.config || return 1
    # fix -fPIC issue in pddp
    sed -e "s|DEFINES =|DEFINES = -fPIC|" \
    -i $srcdir/$pkgname/externals/miXed/Makefile.common || return 1
    # setting additional variable
    FPIC_FLAG="-fPIC"
    else FPIC_FLAG=""
    fi
    #MAKE --------------------------------------------------------------------------
    cd "$srcdir/$pkgname/packages/linux_make" || return 1
    make BUILDLAYOUT_DIR=$srcdir/$pkgname/packages \
    GEM_EXTRA_CXXFLAGS="$FPIC_FLAG" \
    prefix=/usr \
    install || return 1
    package() {
    cp -urv $srcdir/$pkgname/packages/linux_make/build/usr $pkgdir/
    mv $pkgdir/usr/share/man/man1/pd.1 $pkgdir/usr/share/man/man1/pdextended.1
    rm $pkgdir/usr/share/man/man1/pdreceive.1
    rm $pkgdir/usr/share/man/man1/pdsend.1
    rm $pkgdir/usr/include/m_pd.h
    rm $pkgdir/usr/bin/pd-gui.tcl
    cd $srcdir/$pkgname/
    # PD License
    install -Dm644 pd/LICENSE.txt $pkgdir/usr/share/licenses/pd-extended/LICENSE.txt
    cd packages/
    install -p linux_make/default.pdextended $pkgdir/usr/lib/pd-extended/
    # Gnome menu support
    install -d $pkgdir/usr/share/icons/hicolor/128x128/apps
    install -p -m0644 linux_make/pd-extended.png $pkgdir/usr/share/icons/hicolor/128x128/apps/
    install -d $pkgdir/usr/share/icons/hicolor/48x48/apps
    install -p -m0644 linux_make/48x48/pd-extended.png $pkgdir/usr/share/icons/hicolor/48x48/apps/pd-extended.png
    install -d $pkgdir/usr/share/applications/
    install -p linux_make/pd-extended.desktop $pkgdir/usr/share/applications/
    sed -i "s/^Exec=.*/Exec=pdextended/" $pkgdir/usr/share/applications/pd-extended.desktop
    # mime
    install -d $pkgdir/usr/share/mime/packages/
    install -p linux_make/pd-extended.xml $pkgdir/usr/share/mime/packages/
    install -d $pkgdir/usr/share/icons/hicolor/128x128/mimetypes
    install -p linux_make/text-x-puredata.png $pkgdir/usr/share/icons/hicolor/128x128/mimetypes
    # files for /etc
    cd "$srcdir/$pkgname"
    install -d $pkgdir/etc/bash_completion.d/
    install -p scripts/bash_completion/pd $pkgdir/etc/bash_completion.d
    # emacs mode for .pd files
    install -d $pkgdir/usr/share/emacs/site-lisp/
    install -p scripts/pd-mode.el $pkgdir/usr/share/emacs/site-lisp/
    # Pd-related scripts
    install -p scripts/pd-diff $pkgdir/usr/bin/
    install -p scripts/config-switcher.sh $pkgdir/usr/bin/
    # vim:set ts=2 sw=2 et:

    I chroot into workdir. uncommented en_US.UTF-8 in /etc/locale.gen, run locale-gen and now get this inside the chroot.
    [root@dArch2 releng]# chroot work/x86_64/root-image/
    [root@dArch2 /]# locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    this looks alright to me. Any more suggestions?
    It's the first time I use a custom-repo and I set it up only for this purpose. So yes, it's up to date and can be used outside the chroot. Also a different package I put from AUR into my custom-repo installs fine and doesn't give this error.
    How else could I test the custom-repo?

  • Gdk-WARNING **: Error converting from UTF-8 to STRING

    I just installed Arch64 few days ago. In my old setup I was used to work with 2 softwares: Eclipse CDT and WingIDE.
    I tried to start these applications (they require java and python but they are binary releases) locally and I get this errors which I can't solve by myself googling... Reporting snapshots of my desktop too.
    [j_zar@Surprise eclipse]$ ./eclipse
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: Impossibile aprire il convertitore da "UTF-8" a "ISO-8859-1"
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: Failed to load Pango module '/usr/lib/pango/1.6.0/modules/pango-basic-fc.so' for id 'BasicScriptEngineFc'
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: pango_shape called with bad font, expect ugly output
    (eclipse:7864): Pango-WARNING **: pango_font_get_glyph_extents called with null font argument, expect ugly output
    (eclipse:7864): Pango-WARNING **: pango_font_get_metrics called with null font argument, expect ugly output
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: wrong ELF class: ELFCLASS64
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Gdk-WARNING **: Error converting from UTF-8 to STRING: La conversione del set di caratteri da "UTF-8" a "ISO-8859-1" non è supportata
    (eclipse:7864): Pango-WARNING **: pango_cairo_font_get_scaled_font called with bad font, expect ugly output
    [j_zar@Surprise wingide]$ ./wing
    (wing.py:7922): Gdk-WARNING **: Error converting from UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1'
    (wing.py:7922): Gdk-WARNING **: Error converting from UTF-8 to STRING: Conversion from character set 'UTF-8' to 'ISO-8859-1' is not supported
    Anybody can help in this???
    Last edited by J_Zar (2007-10-30 11:48:28)

    There has been talk about adding these config files, that fixes this kinda problems, to a separate pkg with a helper script you run 32bit programs with.
    for quick fix
    Link
    Grab the 3 pango files, throw them somewhere, edit pangorc to corresponding paths for the 2 other files.
    Start program with
    export PANGO_RC_FILE="/path/to/pangorc"
    program
    for the string error, if its iconv
    export GCONV_PATH=/opt/lib32/usr/lib/gconv
    to previous command
    Note, you cant start 64bit programs that use pango/iconv from the terminal you exported the variable.

  • Unable to convert from "UTF-8" during oracle upgrade

    Hi,
    I'm trying to upgrade from 9.2.0.1 to 9.2.0.6, while running the runInstaller, am getting the following error:
    ERROR: Unable to convert from "UTF-8" to "ISO-8859-1" for NLS!
    SuSE-7, redhat-2.1AS, redhat-2.1, UnitedLinux-1.0, redhat-3 or SuSE-8
    can anyone tell me how to fix this problem?
    thanks,
    GK

    Hi Vinod,
    I have already checked that and found the package is available in my system.
    <i># pkginfo - SUNWuiu8
    system      SUNWuiu8 Iconv modules for UTF-8 Locale</i>
    Regards,
    Chintan Sheth

  • Encoding from UTF-16 to UTF-8

    Hi,
    I need to convert from UTF-16 to UTF-8 encoding.
    I receive an CSV file in encoding UTF-16 for our backend system. but our external partner needs the encoding to be UTF-8
    How can I change the encoding ?

    Hello Frank,
    We have used TextCodePageConversionBean to meet such a requirement in one of our scenarios using CSV files.
    http://help.sap.com/saphelp_nw04/helpdata/en/45/da2deb47812e98e10000000a155369/content.htm
    Can you please try this and let us know if this helps?
    Thanks.
    Best Regards,
    Shweta

  • Convert String from UTF-8 to IsoLatin1

    Hi everyone !
    I'm trying to convert a String from utf-8 to IsoLatin1, but i got somt problems.... I'm using
    actually this code, but it won't work...
    I'm getting a utf-8 html String with some data and i will write it down in latin1 to a text file
    String newString = new String(oldString.getBytes("UTF-8"), "ISO-8859-1");If i'm now writing this newString to a TextFile it contains cryptic signs like
    & # 1 3 ; or & # 1 3 7 ; or & # 1 2 8 ;(i separated this chars)
    can anyone tell me where is my fault and how can i solve this problem ?
    Thanks a lot
    Edited by: Sephiknight on Feb 23, 2008 2:41 AM

    Yes its XML, i got a web editor where i can add input (utf-8) and i want to write it down in my class to a xml file (isoLatin1).
    My code looks likte this
         public static void setEditFragment(String content, String xPath) throws Exception {
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             DocumentBuilder builder  = factory.newDocumentBuilder();
             Document document = builder.parse("3001300.xml");
             XPath xpath = XPathFactory.newInstance().newXPath();
             Node node = (Node)xpath.evaluate(xPath, document, XPathConstants.NODE);
            Charset charset = Charset.forName("ISO-8859-1");
            CharsetEncoder encoder = charset.newEncoder();    
            ByteBuffer buf = encoder.encode(CharBuffer.wrap(content));
            node.setTextContent(buf.toString()); 
               // Use a XSLT transformer for writing the new XML file
            Transformer transformer = TransformerFactory.newInstance().newTransformer();
             DOMSource        source = new DOMSource( document );
             FileOutputStream os     = new FileOutputStream("tmp.xml");
             StreamResult     result = new StreamResult( os );
             transformer.transform( source, result ); 
         }The example from http://www.exampledepot.com/egs/java.nio.charset/ConvertChar.html looks great, but if I add my own input string i get a exception that looks like this
    java.nio.charset.UnmappableCharacterException: Input length = 1
         at java.nio.charset.CoderResult.throwException(Unknown Source)
         at java.nio.charset.CharsetEncoder.encode(Unknown Source)
         at HagerAbs.setEditFragment(HagerAbs.java:91)
         at HagerAbs.main(HagerAbs.java:108)When i write my input to the xml file it doesnt look like xml at all, it looks more like
    <synthese>& # 13;
    & # 13;
    & lt;br/& gt;& # 13;
    & lt;img class="thumb" src="http: ......{code}
    (i seperated the char so you can see)
    and this is not what i expected... how can i write it down correctly ?
    Edited by: Sephiknight on Feb 23, 2008 3:26 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • XML: LPX-00200: could not convert from encoding UTF-8 to UCS2

    Hi,
    Greetings!
    I have special character(s) in a column and that character is chr(189) and because of that when i use the xml functions in my query it returns below error.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00200: could not convert from encoding UTF-8 to UCS2
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    I am using sys_xmlagg and getting above error when i encounter the data as below:
    "Dixon¿s Chicago".
    Note: When ever It encounters the bold character string it fails ... Any help !!!
    And one more thing when i create another record with same data by copy and pasting it works fine and when i did a dump on that column data its different. see the below result of dump.
    Naveen.
    SQL> desc temp_xml;
    Name Null? Type
    TNO NUMBER(4)
    NAME VARCHAR2(255)
    SQL> select name,length(name),dump(replace(name,chr(189),'')) data_dmp from temp_xml;
    NAME LENGTH(NAME) DATA_DMP
    ¿s Chicago 10 Typ=1 Len=12: 239,191,189,115,32,67,104,105,99,97,103,111
    ¿s Chicago 10 Typ=1 Len=11: 194,191,115,32,67,104,105,99,97,103,111
    SQL>
    if you observe the above 2 rows the fist row shows length as 12 and second shows as 11. actually 2nd rows works fine but first gives error. I am not able to see where that hidden character is and not able to remove that character.
    Message was edited by:
    naveenhks

    Hi,
    I have a similar problem:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00200: could not convert from encoding UTF-8 to ISO-8859-1I'm executing the following Select when encountering this error:
    SELECT /*+ INDEX(resource_view XDBHI_IDX) */
               extract(resource_view.res, '/Resource/Contents/*').getClobVal()           AS Dokument
      FROM  resource_view
    WHERE resource_view.any_path LIKE '%PATH_TO_FILE%';I have 5 XML-documents and this error occurs at two ('A' and 'B') of them. When I transfer the same 5 documents from another PC the error occurs at document 'C' and not at 'A' and 'B'.
    Any clue or hint which could explain this behaviour? What NLS parameters can I check in order to help you understand the situation?
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

  • LPX-00200: could not convert from encoding UTF-8 to UCS2 during

    When doing an query with SQL/XML on a database with the following characterics
    NLS_LANGUAGE -- AMERICAN
    NLS_CHARACTERSET - UTF8
    NLS_NCHAR_CHARACTERSET - AL16UTF16
    Database version is 9.2.0.5.0
    I get the following error on a text with special characters
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00200: could not convert from encoding UTF-8 to UCS2
    I used the tip from another developer to use the convert function :
    XMLForest(convert(train.programma, 'UTF8', 'WE8ISO8859P1') AS "programma"
    Now at least I don't get the error but in the resulting all special characters (and there are a lot of them!) are garbled
    So for example (hope this comes across during the post)
    original : coördinatoren
    in xml : coördinatoren
    Any suggestions here? I'm not really allowed to change any database-parameters or doing an upgrade
    Maybe using something else in the convert function?

    Here's the complete query (with the convertfunction in it). Hope this helps
    select XMLElement("lmsImport", XMLAttributes('LmsImportSchema.xsd' as "xsi:noNamespaceSchemaLocation",
    'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"),
    XMLElement("trainingen",(
    Select XMLAGG(XMLElement("training",
    XMLElement("id", train.id),
    XMLElement("code", train.code),
    XMLElement("leverancier",
    XMLElement("leverancier",
    XMLATTRIBUTES(NVL(train.leverancier, 'vendr000000000001021') as "leverancierId"))),
    XMLElement("status", (CASE when TRUNC(NVL(train.disc_from, sysdate)) >= TRUNC(sysdate) then
    'Actief'
    else
    'Inactief'
    END )),
    XMLElement("naam", train.naam),
    XMLForest(
    XMLForest(Decode(train.afronding, 'Bewijs van Deelname', 'Instituutsdiploma', train.afronding) AS "afronding") as "afrondingen"),
    XMLForest(
    XMLForest(train.lesmethode AS "lesmethode") as "lesmethodes"),
    XMLForest(
    XMLForest(convert(train.programma, 'UTF8', 'WE8ISO8859P1') AS "programma") as "memos"),
    XMLForest(train.lesduur AS "lesduur")).extract('/*'))
    FROM (select cours.id id, cours.course_no code, cours.custom2 leverancier, cours.disc_from disc_from, cours.title naam, 'Training' lesmethode,
    cours.desc1||cours.desc2||cours.desc3||cours.desc4 programma, ROUND(cours.num_days) lesduur, ddcus.str_value afronding
    from tpt_courses cours
    inner join fgt_domain domin
    on cours.split = domin.id
    left join (fgt_dd_custom ddcus
    inner join fgt_dd_domain_to_attr ddoat
    on ddoat.id = ddcus.attr_id
    on ddcus.owner_id = cours.id
    where (domin.name = 'Content' or domin.name like 'CT%')
    and ddoat.attr_id = 'ddatr900000000000009'
    union
    select prdct.id id, prdct.part_no code, prdct.vendor_id, prdct.disc_from disc_from, prdct.name naam,
    decode(prdct.equip_cat_id, 'eqcat000000000000005', 'WBT', 'eqcat000000000001006', 'Book', 'eqcat000000000001019', 'Training', 'eqcat000000000001037', 'Training') lesmethode,
    prdct.desc1||prdct.desc2||prdct.desc3||prdct.desc4, null, custom7
    from tpt_product_catalog prdct, fgt_domain domin
    where prdct.split = domin.id
    and (domin.name = 'Content' or domin.name like 'CT%')) train )).extract('/*')).extract('/*') from dual;

  • HTTP-Receiver: Code page conversion error from UTF-8 to ISO-8859-1

    Hello experts,
    In one of our interfaces we are using the payload manipulation of the HTTP receiver channel to change the payload code page from UTF-8 to ISO-8859-1. And from time to time we are facing the following error:
    u201CCode page conversion error UTF-8 from system code page to code page ISO-8859-1u201D
    Iu2019m quite sure that this error occurs because of non-ISO-8859-1 characters in the processed message. And here comes my question:
    Is it possible to change the error behaviour of the code page converter, so that the error will be ignored?
    Perhaps the converter could replace the disruptive character with e.g. u201C#u201D?
    Thank you in advance.
    Best regards,
    Thomas

    Hello.
    I'm not 100% sure if this will help, but it's a good Reading material on the subject (:
    [How to Work with Character Encodings in Process Integration (NW7.0)|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42]
    The part of the XSLT / Java mapping might come in handy in your situation.
    you can check for problematic chars in the code.
    Good luck,
    Imanuel Rahamim.

  • Encoding from UTF-8 encoded String to Microsoft Project default encode

    Hi Expert ...
    I have a problem with encoding a String from UTF-8 String in order to write a MPX (Microsoft Project) file. I used UTF-8 on my Database encoding, and I want to write a MPX file using MPXJ library, but the result is (?) character. I think it's because I didn't encode yet to Shift JIS (a Microsoft Product default encoding). And after that I try to encode the String with Shift_JIS encoding, but the same result is appeared. I try to looking another way, but there is no result.
    I hope some expert would help me to solve this problem.
    Thank you,
    Alfian B.

    Totally wrong. A String doesn't have an encoding.
    Now if you had an array of bytes, which were encoded using one charset, and you wanted to convert that to an array of bytes encoded using a second charset, you would use code like this:byte[] bytes = // the bytes encoded in UTF-8, let's say
    String s = new String(bytes, "UTF-8"); // make that into a String
    byte[] newbytes = s.getBytes("windows-31j"); // encode the String into windows-31j

  • Conversion from UTF  to EBCDIC format- Urgent

    I want to convert the data from UTF* format to EBCDIC format and create a flat file for the same. Is there any utility tools available in oracle. If not what are the other possibilities? pls help me.
    Thanks
    Krishnaraj

    Hi ,
    I am trying to convert the normal text data to EBCDIC. As we all know, there is a corresponding value for each normal character in ASCII/HEX/BINARY/EBCDIC etc.
    Using CONVERT I am able to see some data converted correctly but rest of hte accented characters not correctly.
    select convert('^', 'US7ASCII','EBCDIC' ) from dual;
    select convert(';' ,'WE8EBCDIC500','US7ASCII') from dual;
    ^ = ascii normal txt
    ; = corresponding ebcdic of ^
    Internally CONVERT function seems to be doing correct conversion but there is a problem wiht the actually new - to be replaced characters. SQLPLUS is not able to display all the characters correctly. For all the accented chars of "a", it shows plain english a, same wiht e , u etc.
    I would like to know is there anyone who knows what client side settings need to be done so that the CONVERT function output is displayed correctly on SQLPLUS.
    I am using Oracle 9i Rel 2
    NLS_LANG on my client (win XP) is set to AMERICAN_AMERICA.WE8MSWIN1252
    As seen in the CONVERT function, the correct charset is - 'WE8EBCDIC500'
    And the db params are as follows --
    ===========================================
    SQL> select * from NLS_DATABASE_PARAMETERS;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 9.2.0.1.0
    ===================================================
    Can anyone help me on this??
    Thanks in advance
    regards
    Abhivyakti,
    Pune, India

  • Char set conversion to and from UTF-7

    Hi,
    I am working on Char set conversion to and from UTF-7. However I cannot find and ChatToByte classes for UTF-7 in i18n.jar . Any ideas as how to proceed further with this issue. I feel that there must be a way since UTF-7 is a pretty popular charset especially in emails.
    Thanx in advance.
    Khurram

    Hi!
    I had the same problem a couple of months ago. I didn't find any classes in the jdk distribution to do this, nor did I find any classes or package on the web that did this.
    The solution? I got a bit of C code from one of my working mates and converted it to Java. I have the code, but my company own the code. I have to check if it�s ok to share this code with you.
    BTW. If you find any package on the web that does this, pleas inform me.
    Regards
    Johan

  • Reverting the Portal Encoding back to UTF-8 from UTF-16

    Hi all
    The portal configuration for encoding is changed to UTF-16 from UTF-8. After the changes the portal logon screen itself is coming with the junk values.
    The changes are made according to the link below.
    <b>File Based Configuration Properties</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/39fb402eb5f76fe10000000a1550b0/content.html
    The changes made are not reflected.
    We can see that the value of the variable(runtime.doubleByteSupport.encoding
    ) is not changed in Visual admin.(Parameter Reporting in the Visual Administrator)
    Can anyone help regarding this isssue...
    Thanks in advance
    Geogi

    Any Help???

  • Xml payload encoding from utf to iso

    Hi Experts,
    Could you please let me know how can I encode he xml payload from utf-8 to ISO-8859-1.
    its bit urgent any help is appreciated.
    Thanks & Regards,
    Ranganath.

    Hi Ranganath,
    Here is the java mapping for PI 7.1 and above which will transform encoding type from utf-8 to ISO-8859-1.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class addAttributeToTag2 extends AbstractTransformation {
          * @param args
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              // TODO Auto-generated method stub
              try
                   int c;
                   int count=0;
                   String s="";
                   while(1>0)
                        c=in.read();
                        if(c<0)
                             break;
                        if(count<=2 && (char)c=='?')
                             count++;
                        if(count<=2)
                             s=s+(char)c;
                             if(count==2)
                                  s=s.replaceAll("utf-8","ISO-8859-1");
                                  s=s.replaceAll("UTF-8","ISO-8859-1");
                                  count=3;
                                  out.write(s.getBytes());
                             continue;
                        out.write(c);
                        //System.out.print((char)c);
                   in.close();
                   out.close();
              catch(Exception e)
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              try{
                   addAttributeToTag2 genFormat=new addAttributeToTag2();
                   FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\copy.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\copy1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
         public void transform(TransformationInput arg0, TransformationOutput arg1)
                   throws StreamTransformationException {
              this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    if you are working in PI 7.0 the you need following code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class addAttributeToTag2 implements StreamTransformation {
          * @param args
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              // TODO Auto-generated method stub
              try
                   int c;
                   int count=0;
                   String s="";
                   while(1>0)
                        c=in.read();
                        if(c<0)
                             break;
                        if(count<=2 && (char)c=='?')
                             count++;
                        if(count<=2)
                             s=s+(char)c;
                             if(count==2)
                                  s=s.replaceAll("utf-8","ISO-8859-1");
                                  s=s.replaceAll("UTF-8","ISO-8859-1");
                                  count=3;
                                  out.write(s.getBytes());
                             continue;
                        out.write(c);
                        //System.out.print((char)c);
                   in.close();
                   out.close();
              catch(Exception e)
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              try{
                   addAttributeToTag2 genFormat=new addAttributeToTag2();
                   FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\copy.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\copy1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
    However as Krish has pointedf out file adapter has option to set encoding type, you can try that option first.
    regards
    Anupam

  • Convert a UTF-16 format  file to UTF-8 format

    Hi all
          I have a xml file in UTF-16 format I have to convert it into UTF-8 format so that
    it can be opened with Internet Explorer.now when i am opening the file its showing error"<b>Whitespace is not allowed at this location. Error processing resource 'file</b>"
                    the file content is given below
                 < ? x m l   v e r s i o n = " 1 . 0 "   e n c o d i n g = "
    u t f - 8 " ? >
    < _ G L B - R G T X _ O R D E R S C P G >
         < I D O C   B E G I N = " 1 " >
             < E D I _ D C
    4 0   S E G M E N T = " 1 " >
                 < T A B N A M > E
    D I _ D C 4 0 < / T A B N A M >
                 < M A N D T > 1
    5 2 < / M A N D T >
                 < D O C N U M > 0 0 0 0 0 0
    0 0 0 2 7 5 9 7 2 2 < / D O C N U M >
                 < D O C R
    E L > 6 2 0 < / D O C R E L >
                 < S T A T U S > 3
    0 < / S T A T U S >
                 < D I R E C T > 1 < / D I R
    E C T >
                 < O U T M O D > 2 < / O U T M O D >
             < E X P R S S / >
                 < T E S T / >
          < I D O C T Y P > O R D E R S 0 5 < / I D O C T Y P >
                 < C I M T Y P > / G L B / R G T X _ O R D E R S
    C P G < / C I M T Y P >
                 < M E S T Y P > O R D C
    H G < / M E S T Y P >
                 < M E S C O D / >
         < M E S F C T / >
                 < S T D / >
    < S T D V R S / >
                 < S T D M E S > O R D C H G <
    / S T D M E S >
                 < S N D P O R > S A P G E 7 < /
    S N D P O R >
                 < S N D P R T > L S < / S N D P R
    T >
                 < S N D P F C / >
                 < S N D P R
    N > G E 7 Q A R 3 1 5 2 < / S N D P R N >
                 < S N
    D S A D / >
                 < S N D L A D / >
                 < R
    C V P O R > A 0 0 0 0 0 0 0 4 0 < / R C V P O R >
      < R C V P R T > L S < / R C V P R T >
                 < R C V
    P F C > L S < / R C V P F C >
                 < R C V P R N > R
    L E C P G W D I 1 < / R C V P R N >
                 < R C V S A
    D / >
                 < R C V L A D / >
                 < C R E D
    A T > 2 0 0 7 0 6 0 5 < / C R E D A T >
                 < C R E
    T I M > 1 5 4 1 5 3 < / C R E T I M >
                 < R E F I
    N T / >
                 < R E F G R P / >
                 < R E F
    M E S / >
                 < A R C K E Y / >
                 < S E
    R I A L > B U S 2 0 1 2       1 1 0 0 0 0 0 3 0 1 < / S E R
    I A L >
             < / E D I _ D C 4 0 >
             < E 1 E D K
    0 1   S E G M E N T = " 1 " >
                 < C U R C Y > E U
    R < / C U R C Y >
                 < W K U R S > 1 . 0 0 0 0 0 <
    / W K U R S >
                 < Z T E R M > Z 0 0 1 < / Z T E R
    M >
                 < B S A R T > N B < / B S A R T >
       < B E L N R > 4 5 2 0 0 2 2 0 7 2 1 1 0 0 0 0 0 3 0 0 < /
    B E L N R >
                 < R E C I P N T _ N O > 0 1 0 0 0 0
    0 0 0 5 < / R E C I P N T _ N O >
                 < A B R V W _
    B E Z > B U S 2 0 1 2       1 1 0 0 0 0 0 3 0 0 < / A B R V
    W _ B E Z >
                 < _ G L B - R G T _ C H A N G E F L
    A G   S E G M E N T = " 1 " >
                     < Q U A L F >
    0 0 2 < / Q U A L F >
                     < F L A G > X < / F L
    A G >
                 < / _ G L B - R G T _ C H A N G E F L A G
    >
                 < _ G L B - R G T _ C P G D A T A   S E G M E
    N T = " 1 " >
                     < L A N G U > e n < / L A N G
    U >
                     < C O N S I G N _ F L A G > S < / C O N
    S I G N _ F L A G >
                     < I N D I C A T > S < /
    I N D I C A T >
                 < / _ G L B - R G T _ C P G D A
    T A >
             < / E 1 E D K 0 1 >
             < E 1 E D K 1 4 
    S E G M E N T = " 1 " >
                 < Q U A L F > 0 1 4 <
    / Q U A L F >
                 < O R G I D > Z 2 0 0 < / O R G I
    D >
             < / E 1 E D K 1 4 >
             < E 1 E D K 1 4  
    S E G M E N T = " 1 " >
                 < Q U A L F > 0 0 9 < /
    Q U A L F >
                 < O R G I D > 0 0 3 < / O R G I D >
             < / E 1 E D K 1 4 >
             < E 1 E D K 1 4   S E
    G M E N T = " 1 " >
                 < Q U A L F > 0 1 3 < / Q U
    A L F >
                 < O R G I D > N B < / O R G I D >
       < / E 1 E D K 1 4 >
             < E 1 E D K 1 4   S E G M E
    N T = " 1 " >
                 < Q U A L F > 0 1 1 < / Q U A L F
    >
                 < O R G I D > Z 2 0 1 < / O R G I D >
    < / E 1 E D K 1 4 >
             < E 1 E D K 0 3   S E G M E N
    T = " 1 " >
                 < I D D A T > 0 1 2 < / I D D A T >
                 < D A T U M > 2 0 0 7 0 5 1 8 < / D A T U M >
           < / E 1 E D K 0 3 >
             < E 1 E D K 0 3   S E G
    M E N T = " 1 " >
                 < I D D A T > 0 1 1 < / I D D
    A T >
                 < D A T U M > 2 0 0 7 0 5 1 8 < / D A T U
    M >
             < / E 1 E D K 0 3 >
             < E 1 E D K A 1  
    S E G M E N T = " 1 " >
                 < P A R V W > A G < / P
    A R V W >
                 < P A R T N > 2 0 0 0 0 1 2 < / P A R
    T N >
                 < T E L F 1 > + 4 1 2 1 9 2 4 1 8 6 8 < /
    T E L F 1 >
                 < T E L F X > + 4 1 2 1 9 2 4 1 8 6
    7 < / T E L F X >
                 < B N A M E > P l a n t   O p
    e r .   B u y e r < / B N A M E >
                 < P A O R G >
    Z 2 0 0 < / P A O R G >
                 < O R G T X > E u r o p
    e < / O R G T X >
                 < P A G R U > 0 0 3 < / P A G
    R U >
             < / E 1 E D K A 1 >
             < E 1 E D K A 1 
    S E G M E N T = " 1 " >
                 < P A R V W > L F < /
    P A R V W >
                 < P A R T N > 0 1 0 0 0 0 0 0 0 5 <
    / P A R T N >
                 < N A M E 1 > I n t e r n a t i o
    n a l   A g r o . < / N A M E 1 >
                 < S T R A S >
    1 4   R u e   d e   S a h o n e < / S T R A S >
    < S T R S 2 > C h r i s t < / S T R S 2 >
                 < P F
    A C H > 1 5 5 < / P F A C H >
                 < O R T 0 1 > L y
    o n < / O R T 0 1 >
                 < P S T L Z > 1 0 2 0 4 < /
    P S T L Z >
                 < L A N D 1 > F R < / L A N D 1 >
               < T E L F 1 > 0 8 1 < / T E L F 1 >
    < S P R A S > E < / S P R A S >
                 < B N A M E > A
    l f r e d o < / B N A M E >
                 < I L N N R > 7 6 5
    4 3 2 1 5 4 3 2 1 5 < / I L N N R >
                 < S P R A S
    _ I S O > E N < / S P R A S _ I S O >
                 < _ G L B
    - R G T _ T A X C O D E S   S E G M E N T = " 1 " >
            < S P T N U M > 3 4 5 < / S P T N U M >
        < C Y T A X N U M > 4 5 6 < / C Y T A X N U M >
            < O T R I N F O > F R 9 8 7 1 2 5 6 4 4 4 2 < / O T
    R I N F O >
                 < / _ G L B - R G T _ T A X C O D E
    S >
             < / E 1 E D K A 1 >
             < E 1 E D K A 1  
    S E G M E N T = " 1 " >
                 < P A R V W > E K < / P
    A R V W >
                 < N A M E 1 > F R   P L   N e u t r a
    l i a < / N A M E 1 >
                 < N A M E 2 > G T   C o p
    y   R e f e r e n c e   F a c t o r y < / N A M E 2 >
          < S T R A S > G l o b e   S t r e e t   Z 2 0 3 < / S
    T R A S >
                 < O R T 0 1 > N e u t r a l i a < / O
    R T 0 1 >
                 < P S T L Z > 9 9 9 9 9 < / P S T L Z
    >
                 < L A N D 1 > F R < / L A N D 1 >
    < B N A M E > A l e s s a n d r o   V e r r e s c h i < / B
    N A M E >
                 < I L N N R > 5 0 0 0 2 4 3 0 0 0 4 9
    7 < / I L N N R >
                 < _ G L B - R G T _ T A X C O
    D E S   S E G M E N T = " 1 " >
                     < C R N U M
    > 2 9 8 < / C R N U M >
                     < S P T N U M > 3 9
    8 < / S P T N U M >
                     < C Y T A X N U M > 4 9
    8 < / C Y T A X N U M >
                 < / _ G L B - R G T _ T
    A X C O D E S >
                 < _ G L B - R G T _ C P G M I D
      S E G M E N T = " 1 " >
                     < S M T P _ A D D
    R > a l e s s a n d r o . v e r r e s c h i @ n e s t l e .
    c o m < / S M T P _ A D D R >
                 < / _ G L B - R G
    T _ C P G M I D >
             < / E 1 E D K A 1 >
             < E
    1 E D K A 1   S E G M E N T = " 1 " >
                 < P A R V
    W > L S < / P A R V W >
                 < P A R T N > 0 1 0 0 0
    0 0 0 0 5 < / P A R T N >
                 < I L N N R > 7 6 5 4
    3 2 1 5 4 3 2 1 5 < / I L N N R >
             < / E 1 E D K A 1
    >
             < E 1 E D K A 1   S E G M E N T = " 1 " >
         < P A R V W > W E < / P A R V W >
                 < N A M
    E 1 > F R   P L   N e u t r a l i a < / N A M E 1 >
        < N A M E 2 > G T   C o p y   R e f e r e n c e   F a c
    t o r y < / N A M E 2 >
                 < S T R A S > G l o b e
      S t r e e t   Z 2 0 3 < / S T R A S >
                 < O R T
    0 1 > N e u t r a l i a < / O R T 0 1 >
                 < P S T
    L Z > 9 9 9 9 9 < / P S T L Z >
                 < L A N D 1 > F
    R < / L A N D 1 >
                 < _ G L B - R G T _ E 1 E D K
    A 1   S E G M E N T = " 1 " / >
             < / E 1 E D K A 1 >
             < E 1 E D K A 1   S E G M E N T = " 1 " >
       < P A R V W > R G < / P A R V W >
                 < N A M E
    1 > G L O B E   R e f e r e n c e   F r a n c e < / N A M E
    1 >
                 < S T R A S > S t r e e t   1 < / S T R A S
    >
                 < O R T 0 1 > C i t y < / O R T 0 1 >
         < P S T L Z > 1 2 3 4 5 < / P S T L Z >
                 <
    L A N D 1 > F R < / L A N D 1 >
                 < I L N N R > 5
    0 0 0 2 4 3 0 0 0 7 0 1 < / I L N N R >
                 < _ G L
    B - R G T _ T A X C O D E S   S E G M E N T = " 1 " >
              < C O T A X N U M > 1 2 3 4 < / C O T A X N U M >
                     < C R N U M > 1 2 3 4 5 6 7 8 < / C R N U M
    >
                     < S P T N U M > 1 0 0 5 1 9 6 2 < / S P T
    N U M >
                     < C Y T A X N U M > 1 0 0 5 1 9 6 2
    < / C Y T A X N U M >
                     < O T R I N F O > 0 0
    0 0 0 0 0 5 6 7 8 9 < / O T R I N F O >
                     < J
    U R C O D E > 1 0 0 5 1 9 6 2 < / J U R C O D E >
      < / _ G L B - R G T _ T A X C O D E S >
             < / E 1 E
    D K A 1 >
             < E 1 E D K 0 2   S E G M E N T = " 1 " >
                 < Q U A L F > 0 0 1 < / Q U A L F >
    < B E L N R > 4 5 2 0 0 2 2 0 7 2 < / B E L N R >
       < D A T U M > 2 0 0 7 0 5 1 8 < / D A T U M >
    < U Z E I T > 1 4 0 4 4 0 < / U Z E I T >
             < / E 1
    E D K 0 2 >
             < E 1 E D K 1 8   S E G M E N T = " 1 "
    >
                 < Q U A L F > 0 0 1 < / Q U A L F >
       < T A G E > 3 0 < / T A G E >
                 < P R Z N T >
    2 . 0 0 0 < / P R Z N T >
             < / E 1 E D K 1 8 >
       < E 1 E D P 0 1   S E G M E N T = " 1 " >
                 <
    P O S E X > 0 0 0 1 0 < / P O S E X >
                 < A C T I
    O N > 0 0 2 < / A C T I O N >
                 < P S T Y P > 0 <
    / P S T Y P >
                 < M E N G E > 1 0 0 . 0 0 0 < / M
    E N G E >
                 < M E N E E > E A < / M E N E E >
             < B M N G 2 > 1 0 0 . 0 0 0 < / B M N G 2 >
         < P M E N E > E A < / P M E N E >
                 < V P R
    E I > 1 0 < / V P R E I >
                 < P E I N H > 1 < / P
    E I N H >
                 < N E T W R > 1 0 0 0 < / N E T W R >
                 < N T G E W > 8 0 0 < / N T G E W >
    < G E W E I > K G M < / G E W E I >
                 < M A T K
    L > P 2 0 < / M A T K L >
                 < B P U M N > 1 < / B
    P U M N >
                 < B P U M Z > 1 < / B P U M Z >
           < B R G E W > 1 0 0 0 < / B R G E W >
                 <
    W E R K S > Z 2 0 3 < / W E R K S >
                 < E 1 E D P
    0 4   S E G M E N T = " 1 " >
                     < M W S B T >
    0 . 0 0 < / M W S B T >
                 < / E 1 E D P 0 4 >
             < E 1 E D P 2 0   S E G M E N T = " 1 " >
           < W M E N G > 1 0 0 . 0 0 0 < / W M E N G >
           < A M E N G > 0 . 0 0 0 < / A M E N G >
       < E D A T U > 2 0 0 7 0 5 1 8 < / E D A T U >
         < E Z E I T > 1 4 5 0 0 0 < / E Z E I T >
       < _ G L B - R G T _ S L I D 0 1   S E G M E N T = " 1 " >
                         < E T E N R > 0 0 0 1 < / E T E N R >
                   < / _ G L B - R G T _ S L I D 0 1 >
       < / E 1 E D P 2 0 >
                 < E 1 E D P 1 9   S E G
    M E N T = " 1 " >
                     < Q U A L F > 0 0 1 < / Q
    U A L F >
                     < I D T N R > 0 0 0 0 0 0 0 0 0 0
    4 3 0 0 0 0 9 8 < / I D T N R >
                     < K T E X T
    > C a r t o n s   -   C e r e a l s   M i l k   2 4 x 4 5 0 
    g < / K T E X T >
                 < / E 1 E D P 1 9 >
        < E 1 E D P 1 9   S E G M E N T = " 1 " >
      < Q U A L F > 0 0 3 < / Q U A L F >
                     < I D
    T N R > 0 7 6 1 2 2 9 7 0 1 6 1 1 9 < / I D T N R >
        < / E 1 E D P 1 9 >
             < / E 1 E D P 0 1 >
    < E 1 E D S 0 1   S E G M E N T = " 1 " >
                 < S
    U M I D > 0 0 2 < / S U M I D >
                 < S U M M E > 1
    0 0 0 < / S U M M E >
                 < S U N I T > E U R < / S
    U N I T >
             < / E 1 E D S 0 1 >
             < E 1 E D S
    0 1   S E G M E N T = " 1 " >
                 < S U M I D > 0 0
    5 < / S U M I D >
                 < S U M M E > 0 < / S U M M E
    >
             < / E 1 E D S 0 1 >
         < / I D O C >
    < / _ G L
    B - R G T X _ O R D E R S C P G >

    Hi Saurabh,
    your xml is not wellformed coz there are spaces in the prolog between the first character '<' and the '?'. Coz of any reason there are spaces between all characters, that is making your document not readable for parsers including IE. For your task to convert to UTF-8 you can use a XSLT mapping with element "output" and attribut "encoding"
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output encoding="UTF-8"/>
         <xsl:template match="/">
    Regards,
    Udo

Maybe you are looking for