no-English problem: I got '????' when I fetch userName which is saved in Chinese.

0 votes
using Leaderboard Service to save userData. I got '????' when I fetch my userName which is saved in Chinese. How to fix this?
asked Jan 18 in Work In Progress by Alex (10 points)

1 Answer

0 votes

Hi Alex,

Greetings!!!

You can use the Base 64 Encode and Decode technique, where you have to encode your Non-English character before you are going to save/update. For fetching this record back you have to decode back this encoded data. This is directly supported by our SDK.

For getting more detail please have a look at 10th point in this link

In case if you have any other queries please do feel free to reach out to us. We will be happy to help you.

 

Regards,

Priyanka Singh

App42 Team

 

answered Jan 18 by priyanka.singh (89 points)
Hello, thanks for your solution. I have tried this Base 64 Encode and Decode technique ,but it still wont work for somehow:
my input:
    var userName  = "你好啊"
    var encodedString = Base64.encode(userName);
    console.log("Encoded String is : " + encodedString)
    var decodedString = Base64.decode(encodedString)
    console.log("Decoded String is : " + decodedString)
i got:
 Encoded String is : YH1K
 Decoded String is : `}J
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com