Fix bug 19716
Add some tests for non-BMP strings
Add some serialize() tests