Layer7 API Management

  • 1.  french character allow over rest api

    Posted Jul 11, 2018 05:24 AM

    Hi There,

    Our client sends the below JSON data over a rest API (see below sample) seem like this is failing when API passthrough to backend API. Is there something in cluster wide properties to enable a parameter to support French characters? pls advice.

     

    { "Des":"some french charecters ééé? éRép" }



  • 2.  Re: french character allow over rest api

    Posted Jul 11, 2018 06:20 AM

    How is the content-type header of the http request set?
    Especially the charset is on interest here



  • 3.  Re: french character allow over rest api

    Posted Jul 11, 2018 07:10 AM

    content-type=application/json  (SSG 9.1)



  • 4.  Re: french character allow over rest api

    Posted Jul 11, 2018 11:16 AM

    Thank you.
    Please try to use:
    Content-Type: application/json; charset=utf-8
    And of course, use utf8 encoded special french characters.
    Regards
    .....Michael



  • 5.  Re: french character allow over rest api

    Posted Jul 11, 2018 12:02 PM

    In general, when we(client) call a rest service protected from ssg would use the content-type=application/json and send the rest data payload.
    But in this case, the payload which has french chars, are you referring to put specifically for the clients apps invoking ssg protected service Content-Type: application/json; charset=utf-8? pls advice



  • 6.  Re: french character allow over rest api

    Posted Jul 11, 2018 06:13 PM

    When a client program sends text data using http , it usualy has to specify, how the data is encoded. There might be some default encoding, but I assume , this is client program  language/client framework dependent.
    I might be wrong, but to my knowledge, this is not ssg related.
    Regards
    .....Michael



  • 7.  Re: french character allow over rest api

    Posted Jul 13, 2018 03:51 AM

    At which point it is failing?

     

    Default HTML 1.1 charset is ISO-8859-1, so french characters are included, except the Œ, œ which is may be where you are having occasional problems. ISO/IEC 8859-1 - Wikipedia 

     

    As Michael mentions, explicit utf-8 encoding protects you from many side problems.



  • 8.  Re: french character allow over rest api

    Posted Jul 13, 2018 04:01 AM

    See this thread, especially the last response in it.

     

    First, Automic AE does not play well with UTF-8 (sadly), and I don't think you can use UTF-8 for the REST API.

     

    Second, with some tools such as curl, you need to make an explicit conversion from UTF-8 to ISO-8859-1 before sending your REST URL.

     

    If you wish to have the sorry state of affairs regarding AE and UTF-8 addressed in general, please vote for the associated idea.

     

    Hth,