bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Compile: Solaris 9


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Compile: Solaris 9
Date: Tue, 5 Aug 2003 07:38:58 +0000
User-agent: Mutt/1.4.1i

On Tue, Aug 05, 2003 at 08:55:46AM +0200, Jim Segrave wrote
> On Tue 05 Aug 2003 (06:25 +0000), Joern Thyssen wrote:
> > 
> > Jim posted a fix in the Convert routine a few days ago. I don't know if
> > it is committed yet.
> 
> No, I didn't actually post a fix, because it's way too ugly and just
> has to be wrong. There are two problems which need addressing:
> 
> One is why the (I think they are Posix approved) locale names are in
> the form of xx_xx.ISO8859-yy  like de_DE.ISO8859-1 or
>             xx_xx.ISO_8859-yy like de_DE.ISO_8859-1
> while iconv_open is looking for char set names with a hyphen - 
> ISO-8859-1. I'm curious what others who normally use other locales
> have as LANG settings?

My default locale is en_GB, so I don't include the charset.
> 
> The other problem (which I can fix, but haven't) is that if iconv_open
> fails, it will try to output an I18n error message, which will fail,
> which will try to output the same message, ad infinitum (or
> ad-stack-overflow).
> 
> A fix for the second problem is to force the character set to a known
> (and hopefully present) setting before reporting the iconv_open
> failure. It would be easy to force ISO-8859-1, but is it really safe
> to assume that everyone will have support for this one even if it's
> not their native character set?

Why not call "perror" or "strerror" from Convert instead of outputerr?

You also forgot to mention the "id < 0" to "id == (iconv_t) -1" fix.

Jørn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]