]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: Fix UTF-16 support in function blkid_encode_to_utf8()
authorPali Rohár <pali.rohar@gmail.com>
Sun, 9 Feb 2020 12:04:34 +0000 (13:04 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 15 May 2020 09:41:55 +0000 (11:41 +0200)
commit302e1c48e460cbf0ddedcee0cbc4f68de2b9528c
tree45cad544cc0227f0ddf17913b35291eb950e80b6
parentb28fd989696e036114f4c8e21e202f552f0f6343
libblkid: Fix UTF-16 support in function blkid_encode_to_utf8()

Function blkid_encode_to_utf8() says that is supports BLKID_ENC_UTF16LE and
BLKID_ENC_UTF16BE encodings, but it is not truth and supports only UCS-2
(and not full UTF-16).

As all places where BLKID_ENC_UTF16LE and BLKID_ENC_UTF16BE is used expects
UTF-16 and not UCS-2, this patch changes implementation of encodings
BLKID_ENC_UTF16LE and BLKID_ENC_UTF16BE to supports full UTF-16, including
surrogate pairs and not only UCS-2.
libblkid/src/encode.c