Unicode replies

This adds unit testing for yozel's charset fix, removes a test that turned out to be unnecessary, and does a little refactoring.