on 06-16-2005 3:56 PM
Hi,
when I decode and uncode a string using following method :
CALL METHOD l_http_utility=>if_http_utility~encode_base64
EXPORTING
unencoded = foostr
receiving
encoded = foostr.
CALL METHOD cl_http_utility=>IF_HTTP_UTILITY~DECODE_BASE64 EXPORTING
encoded = foostr
receiving
decoded = foostr.
everything works fine.
If I put a number in foostr ( 0000002525 )however, the decode-method does not contains the correct number.
Am i doing something wrong, works this method only with chars ?
I have searched the community on BASE64, found some blogs but nothing that covers my question.
Any hints ?
Dirk.
Dirk,
It only works with strings. You can check this in the class interface of CL_HTTP_UTILITY. In the IF_HTTP_UTILITY~DECODE_BASE64 method, you can see that the params are both strings. Same thing for the ENCODE method.
I tried out your example.
data: test type string.
test = '0000002525'.
test = cl_http_utility=>ENCODE_BASE64( unencoded = test ).
test = cl_http_utility=>DECODE_BASE64( encoded = test ).
It worked well.
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.