From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12103 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: iconv output formats other than UTF-8 Date: Tue, 14 Nov 2017 00:41:27 -0500 Message-ID: <20171114054127.GC1627@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1510638103 25941 195.159.176.226 (14 Nov 2017 05:41:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2017 05:41:43 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12119-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 14 06:41:39 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eETyZ-0006Gk-0a for gllmg-musl@m.gmane.org; Tue, 14 Nov 2017 06:41:35 +0100 Original-Received: (qmail 24131 invoked by uid 550); 14 Nov 2017 05:41:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24113 invoked from network); 14 Nov 2017 05:41:39 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12103 Archived-At: On Mon, Nov 13, 2017 at 10:32:35PM -0600, William Pitcock wrote: > Hello, > > A common complaint is that applications on Alpine cannot output in > encodings other than UTF-8. > > This causes problems with pre-existing IRC networks and other legacy > services where a different text encoding is either preferred or > required. > > As such, this makes the iconv in musl deficient for these use cases. > > A solution could be to link things like IRC clients against GNU > libiconv instead, which we have done in the past on uClibc, but that > could lead to other problems when a user observes inconsistent > behavior with regards to iconv (one app works, the next app does not). > > The better solution would be to somehow enable musl to output in > encodings other than UTF-8. > > We are open to contributing patches to enable this, but would like > suggestions on how to proceed. > > If it is unwanted work, please let us know, and we will just ship GNU > libiconv instead. It's only the legacy cjk encodings that don't havd output support in iconv. This is because they're sufficiently large that reverse mapping via linear search would be sliw, likely offensively slow. But it could be added trivially. Instead, we're researching how to make the mapping efficient without huge reverse tables, and I think a good solution will be found. BTW conversion *from* iso-2022-jp was just added in git master. Rich