Test encoding of strings with multi-byte chars

Sorry for my late reply. Here is just the test with correct indentation.