]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Issue 551: Fix the best-effort UTF8 conversion
authorTim Kientzle <kientzle@acm.org>
Sun, 9 Aug 2015 03:52:19 +0000 (20:52 -0700)
committerTim Kientzle <kientzle@acm.org>
Sun, 9 Aug 2015 03:52:19 +0000 (20:52 -0700)
commit6322b68e8e0cdcb52c2aa441a8ddfad3f9f4b01b
tree76f475c1a85cfc4ac2bbbc5e14eec057aef44ded
parent3c7a6dc6694d9b26400d2bd672e04d09ed8a4276
Issue 551:  Fix the best-effort UTF8 conversion

If a valid character set conversion is impossible, the code falls back
to a best-effort conversion that preserves ASCII bytes and converts
the rest to Unicode Replacement Characters (if the output is UTF8)
or '?' (otherwise).  This code did not correctly track the remaining
bytes in the output buffer; I've replaced this with slower and simpler
code that utilizes the safe string append functions.
libarchive/archive_string.c