made utf32 conversion more robust (hopefully)