I've simplified my script so you can focus on the essence my problem.

In [AutoKey](http://code.google.com/p/autokey/) (not AutoHotKey), I made a Hot-Key (shift-alt-T) that performs this script on any string I have highlighted (like in gedit for example -- but any other gui editor too).

```
strSelectedText = clipboard.get_selection()
keyboard.send_keys(" " + strSelectedText)

```

The script modifies the highlighted text and adds a space to the beginning of the string.

It works for most strings I highlight, but not this one:

```
* Copyright © 2008–2012 Lonnie Best. Licensed under the MIT License.

```

It works for this string:

```
* Add a Space 2.0.1

```

but not on this one:

```
* Add a Space 2.0.1 –

```

At the python command prompt, it has no problem any of those strings, yet the clipboard.get\_selection() function seems to get corrupted by them.

I'm rather new to python scripting, so I'm not sure if this is an AutoKey bug, or if I'm missing some knowledge I should know about encoding/preparing strings in python.

Please help. I'm doing this on Ubuntu 12.04:

```
sudo apt-get install autokey-qt

```