This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: gcj -vs- iconv
- To: Tom Tromey <tromey at cygnus dot com>
- Subject: Re: Patch: gcj -vs- iconv
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Mon, 6 Mar 2000 14:55:59 -0800
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- References: <87zosb7p8q.fsf@cygnus.com>
On Mon, Mar 06, 2000 at 02:39:01PM -0700, Tom Tromey wrote:
>
> This patch does have one minor problem, which is that if --encoding is
> not specified we default to UTF-8 instead of the encoding the user has
> chosen (as part of his locale). I don't know how to find that
> information. Anyway, that is an addition which shouldn't affect
> whether or not this patch goes in, since this patch doesn't make the
> situation any worse than it is right now.
setlocale (LC_CTYPE, "");
cset = nl_langinfo (CODESET);
might give you what you want. nl_langinfo is in <langinfo.h>.
I think there ought to be a way to specify the encoding of a file
*inside* the file. How does Mule do it?
zw