Skip to Content
avatar image
Former Member

Downloading an XML file from WebDynpro

Hi All,

We've a requirement to download composition of formula ( some object ) into XML format in the client system.

We've the method to form the XML string but in this XML string encoding attribute is coming as UTF-16.

I'm using ATTACH_FILE_TO_RESPONSE method to download the file and download happens successfuly.

But when I view this document in internet explorer I get the following error:

'Switch from current encoding to specified encoding not supported.'

<?xml version="1.0" encoding="utf-16"?>

Now my requirement is to althogether remove this encoding attribute from XML string formed.

Any ideas how can we achieve this.


Any other alternative to download an XML document


Manas Dua

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 02, 2009 at 01:32 PM

    I don't believe this is actually a question related to Web Dynpro ABAP. The real question is how can you render your XML into a different encoding. Just changing the encoding specification at the beginning of the XML isn't enough. Technically the rest of the content will still be encoded in UTF-16. How are you building the XML? Are you using the iXML parser? You need to specify the output encoding you want from the stream renderer. I would think you might want to use UTF-8 instead. However this is really a question for ABAP general forum and not WDA.

    Add comment
    10|10000 characters needed characters exceeded