i18n in strings program
Jarkko T Toivonen
jttoivon@cs.helsinki.fi
Fri Feb 20 10:27:00 GMT 2004
Hi,
I was wondering why don't you use the normal isprint() function from
ctype.h, but instead use ISPRINT macro found in safe-ctype.h which
doesn't support localization.
Especially in .mo files there are strings containing non-ascii
characters (not in the range 0-127).
I read some old messages and I understand that:
- it's a good idea to use C locale in assembler identifier names
- switching between different locales in a program is slow and error
prone, hence the use of safe-ctype.h.
But do we have the same problem in strings as well? Is some other
program depending on that strings only uses C locale?
Isn't it enough in gas to set LC_CTYPE to C or POSIX and let other
locales be defined by the environment? Then there wouldn't be problems
with identifier names, and localized error messages, for example, could
still be used.
Jarkko
More information about the Binutils
mailing list