Add some tests for utf-8 encoder.
Add more test cases.