Hi, I am writing unicode stings into a special text file that requires to have non-ascii characters as as octal-escaped UTF-8 codes.
For example, the letter "Í" (latin capital I with acute, code point 205) would come out as "\303\215". I will also have to read back from the file later on and convert the escaped characters back into a unicode string. Does anyone have any suggestions on how to go from "Í" to "\303\215" and vice versa? I know I can get the code point by doing >>> "Í".decode('utf-8').encode('unicode_escape') but there doesn't seem to be any similar method for getting the octal escaped version. Thanks, Michael -- http://mail.python.org/mailman/listinfo/python-list