Forum Discussion
Encoding issue with Json.FromValue and Text.FromBinary functions
Thanks a lot for your response Xiaoxin, but it didn't work out.
Excel file here https://yadi.sk/d/Gt9XwT1H39pE-A
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
- understand7 years agoNew Member
Hello Xiaoxin,
Thanks a lot for this invistigation.
Do I understand correctly that I need to create helper function that will get string like "\u041a\u043e\u0448\u043a\u0430" and transform it to the one of the following from: "#(041a)#(043e)#(0448)#(043a)#(0430)" or "{0x041a,0x043e,0x0448,0x043a,0x0430}".
And then "#(041a)#(043e)#(0448)#(043a)#(0430)" will be displayed as I want and for "{0x041a,0x043e,0x0448,0x043a,0x0430}" I'll need to use Character.FromNumber function?
- Anonymous7 years agoNot applicable
Hi understand ,
Actually, '#' character can direct recognize hex text so you not need add '0x' to point out these value are hex numeric.
If you direct convert each characters to decimal numbers on datasource side, you can direct use 'Character.FromNumber' function to convert them to Russia characters. (convert {0x041a,0x043e,0x0448,0x043a,0x0430} to {1050,1086,1096,1082,1072} also works for that function)
Regards,
Xiaoxin Sheng