This strange Behavior has an explanation. Digits with unicode characters are treated as part of a unicode string. and, since Hebrew is read from right to left, the script will give
string A = "\u05E9";
B and then A
second scenario:
string A = "\u20AA";
A is some unicode, not part of lang, which is read from right to left . therefore, the output is first A followed by B
now consider my own script
string A = "\u05E9"; string B = "\u05EA"; string AB = A + B;
both A and B are part from right to left, read lang, so AB is B , followed by A not A and then B
EDITED to reply to comment
given this scenario -
string A = "\u05E9";
The only solution to get a letter followed by a digit is as follows: string AB = B + A;
not a solution that will work as a whole. So, I think you need to implement some validation conditions and build the string as required.
source share