in reply to Re^3: Reversing Arabic String direction
in thread Reversing Arabic String direction

Like I said, I took a brute-force approach. I'm not surprised at all (and expected) that a better, cleaner way would be apparent to one such as yourself. :)

The code I provided will produce "21_eman" when given "name_21" as input. I think yours does the same (but I didn't test yours.) I have no idea what the correct way of dealing with that is.

You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.
  • Comment on Re^4: Reversing Arabic String direction

Replies are listed 'Best First'.
Re^5: Reversing Arabic String direction
by LanX (Saint) on Jul 10, 2014 at 22:21 UTC
    > I have no idea what the correct way of dealing with that is.

    Arabic is right to left but numbers are written with the lowest digit first, thats why they are the same again (double reversed if you want)

    I suppose someone didn't know and encoded it wrong.

    update

    see example

    Cheers Rolf

    (addicted to the Perl Programming Language)