Sorry, I haven't looked in your changes in detail, but why are you decoding from UTF-8 and not from some other encoding?