[Top][All Lists]

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

Re: Incompatible compiler option fexec-charset

From: Wolfgang Lux
Subject: Re: Incompatible compiler option fexec-charset
Date: Wed, 7 Dec 2011 16:18:13 +0100

Richard Frith-Macdonald wrote:

> Great idea ... but not what the gcc documentation says ... how would we 
> enforce it on our users?
> The gcc documentation says the source characterset is (by default) whatever 
> the current locale says it is (or UTF-8 if the compiler can't determine it 
> from the locale) ... unless overridden by the -finput-charset=  command line 
> option.  The check sees if the compiler is performing according to those 
> rules (in which case no command line options are needed), or if the compiler 
> supports the options to specify the charactersets (in which case we use those 
> options).  If you don't want the check (either you don't have any non-ascii 
> literals, or you are sure your compiler will be generating UTF-8 output) you 
> can disable it.

I guess I must be a bit dumb as I don't get the point you are trying to achieve 
with your configure check.
It looks like you want to allow people to work in a, say, Latin-2 environment, 
but compile their documents as if they were using the UTF-8 encoding? That 
sounds outright wrong to me. If they -- deliberately -- work in a Latin-2 
environment they should save their documents with Latin-2 encoding and the 
source should be interpreted with that encoding by default (and not be 
magically turned in UTF-8, which is likely to fail!). This is, at least 
according, to my understanding of gcc's man page, the default behavior.
And, as I mentioned earlier, the gcc 4.x documentation clearly states that 
UTF-8 is the default for -fexec-charset, so there is no point in adding this 


PS On my Ubuntu 10.04 system the test reports a irritating (but in this case 
harmless) warning: setlocale: LC_ALL: cannot change locale (en_US.ISO-8859-1): 
No such file or directory.

reply via email to

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