This is the mail archive of the
mailing list for the binutils project.
Re: binutils + i18n
Paul Eggert <email@example.com> writes:
> The best solution to use is
> setlocale (LC_ALL, "");
> as is done in, say, fileutils.
> Possibly this was not done in binutils, because binutils uses things
> like 'isalpha' to detect whether a byte is an ASCII alphabetic
> character, and binutils would misfunction if 'isalpha' succeeded on a
> non-ASCII letter. This is a common problem.
> If binutils does have this problem, you shouldn't use either setlocale
> (LC_ALL, "") or setlocale (LC_CTYPE,"") until you fix binutils so that
> binutils no longer assumes ASCII behavior for the ctype.h macros. I
> would also remove the setlocale (LC_MESSAGES, "") until these fixes
> are made, due to the problems noted by your correspondent.
I believe that the assembler should not change the character set it
will accept for identifiers based on the current locale. The
assembler implements a particular programming language, one which I
believe should not be locale dependent. Since the assembler does use
isalpha(), I guess that it makes the mistake you mention, and it
should be rewritten to not use any of the ctype macros.
The issue would be more relevant if there were any translation files
checked into the binutils sources, but, as far as I know, there are