[Top][All Lists]

[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; ; )


Ary Borenszweig wrote in 
> 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:

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,


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]