bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] 1.31: Test 162 (sparse07.at) fails on FreeBSD due to iconv


From: Joerg Schilling
Subject: Re: [Bug-tar] 1.31: Test 162 (sparse07.at) fails on FreeBSD due to iconv() differences
Date: Mon, 14 Jan 2019 14:21:16 +0100
User-agent: Heirloom mailx 12.5 7/5/10

Christian Weisgerber <address@hidden> wrote:

> GNU tar 1.31's regression test #162 (sparse07.at) fails on FreeBSD
> 11 and 12.
>
> This has nothing to do with sparse files.  It concerns unicode file
> names in general.  The underlying problem appears to be a difference
> between GNU iconv() and FreeBSD's iconv().  For a conversion from
> UTF-8 to ASCII, GNU iconv() will return -1 and signal an error if
> the input contains any characters that cannot be represented in
> ASCII.  FreeBSD's iconv() replaces those characters with '?' and
> returns the number of such substitutions.  This latter behavior is
> in agreement with my reading of the POSIX standard on iconv().

Thank you for this hint, it also applies to star....

it will be fixed in the next release that most likely appears tomorrow 
or a day later in the new schilytools tarball.

The problem seems to be a bad working in the standard that makes it hard to 
find that the return code is > 0 if there are non-identical conversions.

BTW: iconv() from BSD is better than the GNU implementation that illegally 
reads too deep into the input even though the output size forbids to convert 
more characters.

Jörg

-- 
 EMail:address@hidden                    (home) Jörg Schilling D-13353 Berlin
    address@hidden (work) Blog: http://schily.blogspot.com/
 URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]