This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Pragma directive or predefined for source charset?
- From: Ian Lance Taylor <iant at google dot com>
- To: Christopher Jones <cpj_public at mac dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 05 May 2009 22:52:31 -0700
- Subject: Re: Pragma directive or predefined for source charset?
- References: <302E706F-2B7D-4D59-A6BB-217C7349542E@mac.com>
Christopher Jones <cpj_public@mac.com> writes:
> I've discovered the -fexec-charset flag. However, after reading all
> the documentation and wading through the gcc source, I still haven't
> found a way to get the value of -fexec-charset at compile time via a
> predefined macro or some kind of pragma directive to control the
> encoding. IBM's XL C/C++ compiler has #pragma filetag to specify the
> charset used in creating the source file, as well as the __FILETAG__
> macro which expands to a string literal representing the character
> coded set of #pragma filetag. It's also got the #pragma convlit
> directive to force the compiler to change the assumed codepage for
> character and string literals within the compilation unit. Is there
> anything like these in GCC? For all my hardcoded string and character
> literals, I need to know the source codeset so I can convert them to
> the user's locale.
gcc doesn't have anything like that. Sorry.
Ian