Here is a draft patch for some of the issues to do with unicode escapes that Teodor raised the other day.
I think it does the right thing, although I want to add a few more regression cases before committing it.
Comments welcome.
cheers
andrew