Reimplemented UTF32 unicode parsing without ConvertFromUtf32

I also wrote a test case for this in the original pull request, but I'm not sure if it is still there from the original merge.