Forum Discussion

understand's avatar
understand
New Member
7 years ago

Encoding issue with Json.FromValue and Text.FromBinary functions

Hello,

I have issue with Russian characters. They are displayed as "\u041a\u043e\u0448\u043a\u0430". I tried different encodings in both Json.FromValue and Text.FromBinary functions.

 



Do you know what can help?

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi understand ,

     

    You can try to use 'change type on locale' to format your text with Russia locale:

     

    Regards,

    Xiaoxin Sheng

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi understand,

         

        I found two functions to convert these hex text:

         

        1,character escape sequence "#".

        2.Character.FromNumber function.

         

        let
            Source =#table({"Source", "Result"},{{"\u041a\u043e\u0448\u043a\u0430","#(041a)#(043e)#(0448)#(043a)#(0430)"},
            {{0x041a,0x043e,0x0448,0x043a,0x0430},Text.Combine(List.Transform({0x041a,0x043e,0x0448,0x043a,0x0430},each Character.FromNumber(_)))}})
        in
            Source

         

        Notice:

        1. Character escape "#" can't used in character stitching.

        2. 'Character.FromNumber' only works on number, you need to convert hex text to decimal numeric value first.

         

        Regards,

        Xiaoxin Sheng