Date: Fri, 23 May 2014 11:59:41 +0400 From: Pavel Timofeev <timp87@gmail.com> To: freebsd-stable stable <freebsd-stable@freebsd.org> Subject: Re: iconv exit code on 10.0 Message-ID: <CAAoTqfvJcddDGKwpXxE5mXBbFuhs0KgGDO-CHwqkW5Y5DBni8g@mail.gmail.com> In-Reply-To: <CAAoTqfsgta6Rxo-VGDkJtjHAqthnh4HC8E=GBnyuY0yM8PhfvA@mail.gmail.com> References: <CAAoTqfsgta6Rxo-VGDkJtjHAqthnh4HC8E=GBnyuY0yM8PhfvA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I've just tried 10-STABLE r266571. Same story like in 10-RELEASE. 2014-05-20 16:04 GMT+04:00 Pavel Timofeev <timp87@gmail.com>: > Hi! > > I've encountered with wrong iconv work. > > root@timbsd:~ # uname -a > FreeBSD timbsd 10.0-RELEASE-p3 FreeBSD 10.0-RELEASE-p3 #0: Tue May 13 > 18:31:10 UTC 2014 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > root@timbsd:~ # locale > LANG=3D > LC_CTYPE=3Dru_RU.UTF-8 > LC_COLLATE=3D"C" > LC_TIME=3D"C" > LC_NUMERIC=3D"C" > LC_MONETARY=3D"C" > LC_MESSAGES=3D"C" > LC_ALL=3D > > I have file with russian content. > root@timbsd:~ # cat /tmp/delete_it > =D0=9A=D0=B0=D0=BA=D0=BE=D0=B9-=D1=82=D0=BE =D1=82=D0=B5=D0=BA=D1=81=D1= =82 =D0=BD=D0=B0 =D1=80=D1=83=D1=81=D1=81=D0=BA=D0=BE=D0=BC. Some text on r= ussian > > =D0=95=D1=89=D0=B5 =D0=BD=D0=B5=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE. Some more. > > > And I wanted to try to convert it to ISO. > root@timbsd:~ # /usr/bin/iconv -t ISO-8859-15 /tmp/delete_it > ?????-?? ????? ?? ???????. Some text on russian > > ??? ???????. Some more. > > iconv: warning: invalid characters: 31 > > root@timbsd:~ # echo $? > 0 > > > Why exit code is 0? Base iconv didn't manage to convert strings so > exit code should be more than 0. That's really bad! > > > converters/libiconv from ports works better in this case! > See: > root@timbsd:~ # /usr/local/bin/iconv -t ISO-8859-15 /tmp/delete_it > /usr/local/bin/iconv: /tmp/delete_it:1:0: cannot convert > root@timbsd:~ # echo $? > 1 > > I tried it on FreeBSD 11-CURRENT and base iconv doesn't have such problem= there. > So I hope that suitable fixes will be MFCd to 10-STABLE.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAoTqfvJcddDGKwpXxE5mXBbFuhs0KgGDO-CHwqkW5Y5DBni8g>