#1067505 libc-bin: iconv: misleading error "illegal input sequence"

Package:
libc-bin
Source:
libc-bin
Description:
GNU C Library: Binaries
Submitter:
Frank Heckenbach
Date:
2024-03-22 16:03:06 UTC
Severity:
normal
#1067505#5
Date:
2024-03-22 15:42:47 UTC
From:
To:
% printf '\xc3\xa4' | iconv -futf8 -tascii
iconv: illegal input sequence at position 0

- First, according to the FSF's own coding standards
  (https://www.gnu.org/prep/standards/html_node/GNU-Manuals.html),
  it should be "invalid" instead of "illegal" since this byte sequence is not
  "prohibited by law".

- The input sequence is not even invalid. It's correct UTF-8 for U+00E4.
  The actual problem is that this character is not representable in the output
  charset. The message gives no indication about this.

- I tried to report it upstream, but that's also broken. According to
https://www.gnu.org/software/libc/manual/html_node/Reporting-Bugs.html, bugs
  should be reported at https://www.gnu.org/software/libc/bugs.html, but this
  page redirects to https://www.gnu.org/savannah-checkouts/gnu/libc/index.html
  which does not mention reporting bugs.