This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
i18n in strings program
- From: Jarkko T Toivonen <jttoivon at cs dot helsinki dot fi>
- To: binutils at sources dot redhat dot com
- Date: Fri, 20 Feb 2004 12:27:30 +0200
- Subject: i18n in strings program
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