UTF-8 Characters Issue In Profile Data

0 votes
Hi,

My app users are from Turkey and they use some latin strings like "Ğ,Ş,İ and ğ,ş,ı". In user profile data, these characters seem as "?".

 

How can I solve this problem?

 

Thanks,
asked Aug 20, 2014 in App42 Cloud API-BaaS by Tufan (64 points)

1 Answer

0 votes

Hello Tufan,

You can save your non english data in base64 encoded string and then decode back after fetching it. In all our SDK, we have Base64 class and it has method to encode and decode string. Let me know on which SDK you are, I will give you the exact snippet to do this.

This is just a workaround to save non english data, however it will be supported directly in our SDK soon.Kindly find the below code snippet for encoding/decoding the non english character:

 

var encoded:Base64Encoder = new Base64Encoder();

encoded.encodeUTFBytes("tesrinievvel");

var decode:Base64Decoder = new Base64Decoder();

decode.decode(encoded.toString());

var decodeString:String  = decode.toByteArray().toString()

trace(decodeString)

 

Let us know if it helps.

 

answered Aug 20, 2014 by hs00105 (2,005 points)
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
...