Subject: Re: iconv and errno
To: None <tech-userlevel@netbsd.org, jklowden@schemamania.org>
From: T.SHIOZAKI <tshiozak@netbsd.org>
List: tech-userlevel
Date: 04/25/2005 23:25:59
From: "James K. Lowden" <jklowden@schemamania.org>
Subject: Re: iconv and errno
Date: Sun, 24 Apr 2005 13:49:58 -0400
Message-ID: <20050424134958.083b4a24.jklowden@schemamania.org>
> Jason Thorpe wrote:
> > On Apr 24, 2005, at 5:09 AM, James K. Lowden wrote:
> > >
> > > 1. $ echo 'hi' | iconv -t asdf -f ucs-2le
> > > iconv: iconv_open(asdf, ucs-2le): No such file or directory
> >
> > This is indeed a bug in iconv(3), even according to our own man
> > page. Please file a PR on this problem separately.
>
> lib/30050
>
> >
> > > 2. $ echo 'hi' | iconv -t ascii -f ucs-2le
> > > iconv: iconv(): Invalid argument
> > >
> > > Should say that '\n' at byte 3 is an incorrect or incomplete
> > > sequence for
> > > ucs-2le.
> >
> > Actually, EINVAL is a valid error code for "incomplete character or
> > shift sequence". However, it would probably be a good idea to file a
> > separate PR for this issue so that the NetBSD iconv experts can take
> > a look.
>
> bin/30051
>
> Thanks, Jason.
I fixed both (with a little adjustment for the latter).
Thanks for your report.
--
Takuya SHIOZAKI