unicode in login and email's

0 votes
Hello. I tried to register user with uniode encoding name (cyrillic) but user registered with name like '?????'.
 
Also i tried to create password verification email in uniode characters, but when email was received i got same '????????' symbols instead of real text

 

asked Dec 24, 2014 in App42 Cloud API-BaaS by gemobile.team (26 points)
recategorized Feb 13, 2015 by sushil

1 Answer

0 votes
 
Best answer

Hello GeoMobile,

To overcome on this issue, first you need to encode the userName at client side & send the encoded string to server for registration and after regustering user decode it back on the client side.

Kindly find the code snippet on 10th point from here  & let us know if it helps.

Himanshu Sharma

answered Dec 24, 2014 by hs00105 (2,005 points)
selected Dec 24, 2014 by gemobile.team
yes, thank, with username this works, but what about email? i found a one way - i use image with text instead of text
You can apply both way, one way you can use image with text or second you can split email id before & after '@'  sign & encode it on client side & decode it back after success result. Let us know if it helps.
Himanshu Sharma
on Android, the method ScoreBoardService.getUserRanking(gameName, userName) on some encoded names got error,
when i try
encoded name is: 0L/QuNC00L7RgA==
i got error: com.shephertz.app42.paas.sdk.android.App42Exception: Can not parse String : 404 Not Found

my lib version is: App42_ANDROID_SDK_3.0.1

i think this is because encoded name contains slash coz other encoded names (without slash) work ok, but I not shure.  

STACK_TRACE=com.shephertz.app42.paas.sdk.android.App42Exception: Can not parse String : 404 Not Found
    at com.shephertz.app42.paas.sdk.android.connection.RESTConnectorCache.
handleException(RESTConnectorCache.java:377)
    at com.shephertz.app42.paas.sdk.android.connection.RESTConnectorCache.
getResponse(RESTConnectorCache.java:453)
    at com.shephertz.app42.paas.sdk.android.connection.RESTConnectorCache.
executeGet(RESTConnectorCache.java:145)
    at com.shephertz.app42.paas.sdk.android.game.ScoreBoardService.
getUserRanking(ScoreBoardService.java:709)
Thanks for sharing the details with us. The error which you have shared is occur due to '/'
because its breaking the URL into two part & pointing out on different method/resource. That's why you are getting 404 exception. To overcome on this issue, you can replace the '/' from '%2F' when saving the user score & fetching it back into app from App42 data base.

For Example:
Your user Name is: "0L/QuNC00L7RgA==" & you can replace this string using replace function:
String userName = "0L/QuNC00L7RgA==".replace("/","%2F");
 
Please check & let us know if it helps.
Himanshu Sharma
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
...