]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: iso9660: improve label parsing
authorPali Rohár <pali.rohar@gmail.com>
Wed, 9 Dec 2020 23:21:55 +0000 (00:21 +0100)
committerPali Rohár <pali.rohar@gmail.com>
Wed, 9 Dec 2020 23:21:55 +0000 (00:21 +0100)
commitdab6d75cfc344a9477889778fe3f84748c9742a8
tree712d8796e725a332ad236d819d488e33879c93b0
parent4bfcb1fc4af2345f055876dabc7be778bcbf4b70
libblkid: iso9660: improve label parsing

Label in Joliet is UNICODE (UTF16BE) but can contain only 16 characters.
Label in PVD is subset of ASCII but can contain up to the 32 characters.
Non-representable characters are stored as replacement character '_'.

Label in Joliet is in most cases trimmed but UNICODE version of label in
PVD. Based on these facts try to reconstruct original label if label in
Joliet is prefix of the label in PVD (ignoring non-representable
characters).

It is possible that label in Joliet and PVD are totally different. In this
case label from Joliet as prior this change.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
libblkid/src/superblocks/iso9660.c