https://access.redhat.com/solutions/3394991
How to specify character set for execution file in gcc
SOLUTION UNVERIFIED - 已更新 2018年三月29日14:21 -
环境
- Red Hat Enterprise Linux 7
问题
- How to specify character set for execution file in gcc.
决议
Use -fexec-charset
, for example:
$ gcc -fexec-charset=sjis example.c
根源
- GCC(1) explains the option.
-fexec-charset=charset
Set the execution character set, used for string and character
constants. The default is UTF-8. charset can be any encoding
supported by the system's "iconv" library routine.