Sorry, I tried it now and you are right VERSION.encode('raw_unicode_escape') does work :)