Subject: Re: iconv question
To: None <>
From: Masao Uebayashi <>
List: tech-userlevel
Date: 01/20/2004 10:10:02

> pkgsrc/misc/scmxx doesn't work for me on -current
> with our native libiconv.

s,misc,comms, :)

> We have patches in pkgsrc that look like this:
> -      t=convert_from_internal(nl_langinfo(CODESET),wide_str,2);
> +      t=convert_from_internal("char",wide_str,2);
> since that seems to have worked with the libiconv
> package, but this doesn't work with our libiconv.
> The nl_langinfo version doesn't seem to work either.

I think "convert_from_internal" is a very Glibc dependent idea...  I
think the iconv specification doesn't require to define "internal
codeset".  Glibc happens to use UCS-4 or something like that as an
internal codeset.

How Citrus iconv works should be explained by someone else.
(Soda-san? :-)

> Also, the configury stuff of the package tries sets the
> INTERNAL_CHARSET to "WCHAR_T", which is not accepted by
> our libiconv either. Again, I'm not sure who is correct.
> [This is then used as first or second argument for
> iconv_open()].

Citrus iconv doesn't have "WCHAR_T".  Maybe using "utf-8" can work
around this case.  "iconv -l" shows available codeset names.