[MacPorts] #57886: libiconv doesn't support "UTF8" alias

MacPorts noreply at macports.org
Thu Jan 10 13:32:05 UTC 2019


#57886: libiconv doesn't support "UTF8" alias
-------------------------+----------------------
 Reporter:  kyz          |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:               |       Port:  libiconv
-------------------------+----------------------
 I'd like libiconv to support the "UTF8" alias for the UTF-8 charset in
 iconv_open()

 * as glibc supports
 * as BSDs support
 * as macOS supports natively
 * as Cygwin patches libiconv to support "for better compatibility with
 glibc"
   (see https://cygwin.com/ml/cygwin/2015-02/msg00482.html and
 https://github.com/cygwinports/libiconv/blob/master/1.14-aliases.patch)
 * as libiconv < 1.13 supported

 Background: with libiconv 1.13, the maintainers decided to limit various
 aliases to specific OSes (see 2008-04-06 changelog entries), and they
 decided "UTF8" was an HPUX specific alias (I would disagree), so libiconv
 >= 1.13 doesn't recognise "UTF8" as an alias except when compiled on HPUX.

 My software, cabextract, used "UTF8" because it was the most portable name
 for the UTF-8 charset amongst iconv() implementations. For example, newlib
 does not support libiconv's preferred "UTF-8", only "UTF8" or "UTF_8", so
 "UTF8" is the common denominator.

 "UTF8" works on all common platforms... but not Macports. "UTF-8" works on
 all common platforms, but not systems using newlib.

 I've had to change my software just for Macports, now it tries out
 multiple names for the same charset until one works. This is not normal.
 It would be better if Macports changed to support "UTF8" as an alias.

 Please add a patch to libiconv that uncomments line 61 of
 lib/encodings.def

-- 
Ticket URL: <https://trac.macports.org/ticket/57886>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list