Fix the UnicodeEncodeError when using non-ascii characters in abort() an...

Fix the UnicodeEncodeError when using non-ascii characters in abort() and puts().