This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[Marc Lehmann <root@plan9.de>] libc/1934: iconv returns -1/EILSEQ instead of nuber of non-reversible changes
- To: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
- Subject: [Marc Lehmann <root@plan9.de>] libc/1934: iconv returns -1/EILSEQ instead of nuber of non-reversible changes
- From: Andreas Jaeger <aj at suse dot de>
- Date: 12 Dec 2000 20:27:15 +0100
- Cc: Marc Lehmann <root at plan9 dot de>
Hi,
has anybody an fix for this?
Andreas
Subject: Topics
Topics:
libc/1934: iconv returns -1/EILSEQ instead of nuber of non-reversible changes
- To: libc-gnats at gnu dot org, gnats-admin at gnu dot org
- Subject: libc/1934: iconv returns -1/EILSEQ instead of nuber of non-reversible changes
- From: Marc Lehmann <root at plan9 dot de>
- Date: Sun, 26 Nov 2000 11:55:02 -0500
>Number: 1934
>Category: libc
>Synopsis: iconv returns -1/EILSEQ instead of nuber of non-reversible changes
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: libc-gnats
>State: open
>Quarter:
>Keywords:
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sun Nov 26 11:55:02 -0500 2000
>Cases:
>Originator:
>Release: libc-2.1.3
>Organization:
--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@opengroup.org |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|
>
>Environment:
Host type: i586-pc-linux-gnu
System: Linux cerebro 2.2.17 #1 SMP Mon Oct 16 00:47:15 CEST 2000 i686 unknown
Architecture: i686
Addons: glibc-compat linuxthreads crypt ncurses
Build CC: gcc
Compiler version: gcc-2.95.2 19991024 (release)
Kernel headers: 2.2.17
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: no
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
when iconv (both commandline tool as well as iconv(3)) encounters a
character sequence that is not representable in the destination character
set it returns -1, errno = EILSEQ instead of 1 (or the respective number
if non-reversible changes, as is documented in botht eh manpage and the
info docs), this makes iconv quite useless in practise, as a workaround
requires almost as much knowledge about the character set as iconv itself
has :(
>How-To-Repeat:
(encoding format in my terminal was iso-8859-1)
*cerebro:~# echo hallöchen | iconv -f iso-8859-1 -t utf-8
hallÃ
ƒ
¶chen
*cerebro:~# echo hallöchen | iconv -f iso-8859-1 -t us
halliconv: illegal input sequence at position 4
>Fix:
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj