fix iconv output of surrogate pairs in ucs2

in the unified code for handling utf-16 and ucs2 output, the check for
ucs2 wrongly looked at the source charset rather than the destination
charset.
1 file changed