Uniface User Forum

 View Only
  • 1.  Converting special characters in json data

    Posted 03-25-2024 10:31

    Hi all,

    We are receiving data in json structures. For some characters we receive escaped codes such as \uxxxx

    Example : \u00E9 for an 'é', \u0027 for an apostrophe, etc

    Is there a Uniface function to convert them ?

    Thanks for your help

    Nicolas



    ------------------------------
    Nicolas Colmart
    Self Registered
    Nice FR
    ------------------------------


  • 2.  RE: Converting special characters in json data

    PARTNER
    Posted 03-25-2024 20:59
    Edited by Hortion Gilles 03-25-2024 21:00

    Hi Nicolas,

    Try to transform unicode char to xml entity :

    \u00e9 -> &#xu00e9;

    en use $string to get ascii character :

    $string(« é » ) -> è

    Gilles.



    ------------------------------
    Hortion Gilles
    Dedalus Healthcare France
    Artigues Pres Bordeaux FR
    ------------------------------



  • 3.  RE: Converting special characters in json data

    Posted 03-26-2024 03:09

    Hi Gilles

    Thanks for your help

    Regards,

    Nicolas



    ------------------------------
    Nicolas Colmart
    Self Registered
    Nice FR
    ------------------------------