View Single Post
Old 09-10-2015, 05:07 AM   #36
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by gipsy View Post
EDIT: Sorry they didn't work with the replace in unicode code

For example the "γΰρω" is changed to "γ\u03CDρω"
Because of the idiotic rather counterintuitive way that Python handles Unicode strings, you'll have to use the actual characters instead of the Unicode codes if you want to avoid the whole Python Unicode encode/decode mess.

Change the following line from:

Code:
	CorrectText("Changed \u03CD to \u03B0", r'\u03B0', r'\u03CD')
to

Code:
	CorrectText("Changed \u03CD to \u03B0", r'ΰ', r'ύ')
This'll change γΰρω to γύρω.
Doitsu is offline   Reply With Quote