]> 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)
committerPali Rohár <pali.rohar@gmail.com>
Sun, 9 Feb 2020 12:04:34 +0000 (13:04 +0100)
commitf8b9b7439456c5ab8d95ad3c27f905ebd501685f
tree093d742d445cf61649aea53b9e72c203471a0ee7
parentb7c015d1c518893c1254c03772bedb59e8487ba0
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