--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: libc6: iconv_open fails with special character set "char"
- From: Hendrik Sattler <sattler2000@gmx.de>
- Date: Sat, 15 Nov 2003 13:25:45 +0100
- Message-id: <E1AKzUn-0002Rw-00@hendrik-sattler.de>
Package: libc6
Version: 2.3.2-9
Severity: normal
Hi,
according to
http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
iconv_open should accept "char" as a character set.
To be more speicific from that site:
Locale dependent, in terms of char or wchar_t
(with machine dependent endianness and alignment, and with semantics depending
on the OS and the current LC_CTYPE locale facet)
char, wchar_t
And a little bit down the page:
The empty encoding name "" is equivalent to "char": it denotes the locale
dependent character encoding.
"" and "wchar_t" are accepted (no error) but "char" isn't, although it should be
equal to "".
A bug report about the outdated iconv_open manpage is already filed.
The little program, I used to check:
--------------------snip------------------------------
#include <iconv.h>
#include <stdio.h>
#include <errno.h>
int main () {
iconv_t cd;
printf("\"char\" -> \"UTF-16\"\n");
if ((cd=iconv_open("UTF-16","char"))==(iconv_t)-1) {
printf("Error on text conversion: %s\n", strerror(errno));
}
printf("\"\" -> \"UTF-16\"\n");
if ((cd=iconv_open("UTF-16",""))==(iconv_t)-1) {
printf("Error on text conversion: %s\n", strerror(errno));
}
printf("\"wchar_t\" -> \"UTF-16\"\n");
if ((cd=iconv_open("UTF-16","wchar_t"))==(iconv_t)-1) {
printf("Error on text conversion: %s\n", strerror(errno));
}
}
--------------------snip------------------------------
Output is:
"char" -> "UTF-16"
Error on text conversion: Invalid argument
"" -> "UTF-16"
"wchar_t" -> "UTF-16"
Hendrik Sattler
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux linux 2.4.22 #2 Di Aug 26 20:38:51 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to de_DE@euro)
Versions of packages libc6 depends on:
ii libdb1-compat 2.1.3-7 The Berkeley database routines [gl
-- no debconf information
--- End Message ---
--- Begin Message ---
- To: Hendrik Sattler <sattler2000@gmx.de>
- Cc: 220889-done@bugs.debian.org
- Subject: Re: libc6: iconv_open fails with special character set "char"
- From: Aurelien Jarno <aurelien@aurel32.net>
- Date: Wed, 21 Feb 2007 17:15:14 +0100
- Message-id: <20070221161512.GA5679@amd64.aurel32.net>
- In-reply-to: <E1AKzUn-0002Rw-00@hendrik-sattler.de>
- References: <E1AKzUn-0002Rw-00@hendrik-sattler.de>
On Sat, Nov 15, 2003 at 01:25:45PM +0100, Hendrik Sattler wrote:
> Package: libc6
> Version: 2.3.2-9
> Severity: normal
>
>
> Hi,
>
> according to
> http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
> iconv_open should accept "char" as a character set.
This is the documentation of libiconv, another implementation of the
iconv library, not the documentation of the glibc.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
--- End Message ---