This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: gcj -vs- iconv


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]