Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

URL Encoding ISO after Unicode Migration

timosteinbach
Newcomer
0 Likes
592

Hi Experts,

after Unicode Migration I have a Problem to send ISO-Encoded data via http-request directly from ECC. ICM allways trys to convert the data into UTF-8. For example: I send %E4 and ICM converts into the unknown character %ef%bf%bd. I use the following Code:

lv_url = "http://receiver_ip/http_interface.php?data=<%3Fxml%20version%3D"1.0"%20encoding%3D"ISO-8859-1"%3F><EQUIPMENT><EQKTX>%E4S%209595-S36%20Pentium%2066%2F64MB%2F2x1d<%2FEQKTX><%2FEQUIPMENT>.
CALL METHOD cl_http_client=>create_by_url
    EXPORTING
      url                = lv_url
    IMPORTING
      client             = l_http_client
    EXCEPTIONS
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      OTHERS             = 4.
  CALL METHOD l_http_client->request->set_method( if_http_request=>co_request_method_post ).
  l_http_client->request->set_header_field( name = 'Content-Type' value = 'text/xml; charset=ISO-8859-1' )
  CALL METHOD l_http_client->send
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2.
  CALL METHOD l_http_client->receive
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2.

The request in ICM-Monitor-Tracefile Looks like this:
POST /http_inter
face.php?data=%3
c%3fxml%20versio
n%3d%221.0%22%20
encoding%3d%22IS
O-8859-1%22%3f%3
e%3cEQUIPMENT%3e
%3cEQKTX%3e%ef%b
f%bdS%209595-S36
%20Pentium%2066%
2f64

Thank you for help,
Timo
0 REPLIES 0