Jan-02-2018, 07:12 PM
Before posting here I resarched the subject of unicode replace, but got nowhere. I am using Python 3 version of Autokey, with which I want to run a script to clean up scanned text. The replacement character (U+FFFD) is scattered all over the document and want to replace them with "" (empty string). Please see sample text below the code. Can someone in the know suggest what I am missing?
my attempt
sample text
my attempt
1 2 3 4 5 6 7 8 |
ctrla = "<ctrl>+a" ctrlc = "<ctrl>+c" keyboard.send_keys(ctrla + ctrlc) page = clipboard.get_selection() char = u "\uFFFD" page.replace(char,"") ctrlv = "<ctrl>+v" keyboard.send_keys(ctrlv) #test code to see contents of clipboard. |
Quote:��To summarize: Man is evolving and in that evolution he has lost
some physical traits and gained some mental ones. But neither in
their losses nor in their gains have all strains evolved to the same extent.
Some races have lost the skin pigment, but others have made little
progress in this direction. We are getting rid of our body coat of
hair, but the Akkas of the Upper Nile and special smaller strains have
a very hairy body, and so appendix and tail (coccyx) show variations
that run in families. Likewise in the acquisition of mental traits,
whole races differ in their ability to speak, to count, to foresee. The
Ethiopian has no more need for thrift than the tropical monkey and
has not acquired it. It is not surprising that there are strains, even
��
�