How to Reverse Characters in a Variable

type -a python at the Bash shell tells me where all the Python executables are.
I only have Python 3.6.5 and 2.7.10 in my system
I created the symlink /usr/local/bin/python to point to Python 3.6.5
python at the shell prompt also points to 3.6.5
I left the default executable at /usr/bin/python to run Python 2.7.10 for compatibility
There is nothing at /usr/local/bin/python3
Yes, it's messy, but I can figure out which version is running.
Both versions can work with Unicode and both have the same issue when run within KM.
Kind of stuck for now ...

type python won’t tell you anything about the python version found.

Of course, following the destinations of the links manually will reveal the program.

But, to be sure, check the versions from within KM (i.e. in a KM Shell Script action):

python3 -V
python -V
python2.7 -V
# etc.

# or —if you don’t have set your $PATH in KM:

/usr/local/bin/python3 -V
/usr/local/bin/python -V
# etc.

‌

Hmm. In my tests (see above) none of them (neither python2 nor 3) gives the correct result. The result of python2 is completely Unicode-unaware (result=gibberish), python3 seems to be Unicode-aware, but it fails with the grapheme cluster boundaries (accents on the wrong letters, etc.). See one of the posts above for “grapheme cluster”.

Which version of KM are you running?