Add missing error check for convert_utf8_utf16be call.

Note: this call can fail for a number of reasons other than invalid input data.
It's currently failing on Medic OS due to an incomplete gconv setup (namely, a
gconv setup that's missing UTF-16.so and UTF-8.so).