tamil_letter_ma = u"\u0bae"
marked_text = ur"\a%s\bthe Tamil\cletter\dMa\e" % tamil_letter_ma
It's easy to overcome the limitation.
Why don't you just use raw string literal (
r'....'), you don't need to specify
u because in Python 3, strings are unicode strings.
>>> tamil_letter_ma = "\u0bae" >>> marked_text = r"\a%s\bthe Tamil\cletter\dMa\e" % tamil_letter_ma >>> marked_text '\\aம\\bthe Tamil\\cletter\\dMa\\e'
To make it also work in Python 2.x, Add the following Future import statement at the very beginning of your source code, so that in the string literals in the source code become unicode.
from __future__ import unicode_literals