]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: udf: Correctly handle UDF strings encoded in 8bit OSTA Compressed Unicode
authorPali Rohár <pali.rohar@gmail.com>
Tue, 16 May 2017 21:52:05 +0000 (23:52 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Tue, 16 May 2017 21:52:05 +0000 (23:52 +0200)
commit22acc2681de1ae2e10d7f1e7e62538af37bc2982
tree31a64b2fd5ff573c0ff9032821af95843ae2229c
parent98bc12ab483858bbbd8b2c4b8de33e9679e957e3
libblkid: udf: Correctly handle UDF strings encoded in 8bit OSTA Compressed Unicode

String encoded in 8bit OSTA Compressed Unicode contains one Unicode
codepoint per 8bits. Maximal Unicode codepoint is U+FF. Which effectively
means that it is equivalent to Latin1 encoding.

Before this patch libblkid copied raw 8bit OSTA Compressed Unicode from
disk and treated it as UTF-8. It worked fine just for UTF-8 invariants,
other characters were incorrectly encoded. This patch fixes this problem.

Note that processing UUID is not fixed in this patch.
libblkid/src/superblocks/udf.c