Support for different string encodings.
Merge remote-tracking branch 'upstream/tests' into string_encodings