bug-gnu-libiconv
[Top][All Lists]
Advanced

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

Re: [bug-gnu-libiconv] iconv considers invalid UTF-8 sequence as valid


From: Bruno Haible
Subject: Re: [bug-gnu-libiconv] iconv considers invalid UTF-8 sequence as valid
Date: Fri, 18 Nov 2016 00:05:43 +0100
User-agent: KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; )

Hi,

Ary Borenszweig wrote in 
http://lists.gnu.org/archive/html/bug-gnu-libiconv/2016-09/msg00003.html:
> Steps to reproduce:
> 
> 1. Create a file with 4 bytes with the given values: 247, 178, 187, 190
> 
> You can use this Ruby script for this:
> 
> ~~~
> File.open("invalid.txt", "w") do |file|
>   file << "\xf7\xb2\xbb\xbe"
> end
> ~~~
> 
> 2. Execute `iconv -f UTF-8 -t UTF-8 invalid.txt`
> 
> Expected: iconv should say "cannot convert"
> Actual: it works, we get the same bytes as the input (you can see this if
> you put the result of iconv in another file)

Thank you for the report.

For GNU libiconv, this has now been fixed:
http://git.savannah.gnu.org/gitweb/?p=libiconv.git;a=commit;h=0a04404c90d6a725b8b6bbcd65e10c5fcf5993e9

For GNU glibc (which contains the main GNU iconv implementation), a bug report
is still open: https://sourceware.org/bugzilla/show_bug.cgi?id=2373

Best regards,

                Bruno

--
In memoriam Josef Matoušek <http://en.wikipedia.org/wiki/Josef_Matoušek>




reply via email to

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