playMaker

Author Topic: Arabic build string  (Read 1868 times)

ergin

  • Junior Playmaker
  • **
  • Posts: 86
Arabic build string
« on: June 17, 2016, 04:57:56 PM »
Hello,

I'm keeping user info inside a single string on my servers and I use build string to serialize this info into a single string such as: id.tostring + score.tostring + name
> 21-1400-Mike

the problem here that it seems like although my game is local I have an user with arabic android device. his order seems reversed.
> Arabletters-21-1400

I checked the code of buildstring, seems straight forward. Are there any Arab users here? Does the arabic version of Unity or Linux sums strings in reverse order? ('Cause arabic is written from right to left in contrast to other languages)

Or am I getting hacked, I wonder :P

Thanks.

orenfridman

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Arabic build string
« Reply #1 on: June 18, 2016, 12:10:23 AM »
You will get this with hebrew also, restrict user name no numbers, and test string if starts with a letters.
« Last Edit: June 18, 2016, 12:11:55 AM by orenfridman »

ergin

  • Junior Playmaker
  • **
  • Posts: 86
Re: Arabic build string
« Reply #2 on: June 18, 2016, 12:41:56 AM »
Thanks for the answer!

I am getting name from facebook sdk and I use
Code: [Select]
result.ResultDictionary["name"].ToString(); so it's strictly a string.I thought It shouldn't matter if it contains numbers as it is converted into string as the rest of the components are ints and floats converted into strings.

But interestingly you are right arabic words seem to have numbers in them. Do you know the reason why this happens?

Will restricting or removing numbers from the name solve the problem? as they are right to left languages, won't it be added to the start even if it is completely a string.

Thanks again.