In Python 2.4.2 and Python 2.4.1 (Windows XP) >>> "\t\\t".encode("string_escape") '\\t\\\\t' >>> "\t\\t".encode("unicode_escape") '\\t\\t' >>> "\t\\t".encode("raw_unicode_escape") '\t\\t' >>> u"\t\\t".encode("unicode_escape") '\\t\\t' >>> u"\t\\t".encode("raw_unicode_escape") '\t\\t' I would have expected all to produce the same result. Also round-tripping with the encoding doesn't seem to work: >>> "\t\\t".encode('string_escape').decode('string_escape') '\t\\t' >>> u"\t\\t".encode('unicode_escape').decode('unicode_escape') u'\t\t' Thanks Mark