Skip to Content

# symbol in string after base64 encoding/decoding

Hello!

We are sending XML files from our ERP to another SAP system. In order to send those files we first encode them, insert encoded text into SOAP message body and then send to a webservice that deals with forwarding the request to our target system. However there is a slight mistake in encoding the xml file - after decoding there appears to be a "#" symbol in the very beginning of the file. I've debugged the encoding process multiple times and this symbol does not exist there before encoding. This doesn't necessarily mean that there is a "#" symbol in the file. It could be newline or some other kind of symbol yet I used CONDENSE on that string and it doesn't make the problem go away. Has anybody else had this problem in the past?

I should also add that the files being read are BCM Batch payment files that are stored in TemSe.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 22, 2014 at 11:25 AM

    Hi,

    Try:

      REPLACE first OCCURRENCES OF REGEX '[\n\t\r]' IN <your string> WITH '' .

                 

    regards.      

    Add comment
    10|10000 characters needed characters exceeded

    • Well that's the thing. I shouldn't need to write this XML into physical file before it has reached its destination. And it should already be sent in correct form. So what I need to do, is remove BOM from string and then encode it.