Correctly localized strings
Nick Clifton
nickc@cambridge.redhat.com
Thu Apr 19 00:39:00 GMT 2001
Hi Michal,
> However, it is needed to correctly initialize locales in the strings.
> Now, only messages are used (LC_MESSAGES), it is needed to init all
> locales (LC_ALL).
This first part of your patch seems fine.
> And finally, use the isprint function, not isascii, as not all local
> characters are ascii.
This second part has a problem though. On some, older, systems,
isprint() is only defiend to work on values that are accepted by
isascii() and using values outside of that range will produce
segmentation faults.
I think that perhaps this part of your patch:
> -#ifdef isascii
> -#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
> -#else
> #define isgraphic(c) (isprint (c) || (c) == '\t')
> -#endif
ought to be changed to:
> +#if defined isascii && ! defined HAVE_LOCALE_H
> #define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
> #else
> #define isgraphic(c) (isprint (c) || (c) == '\t')
> #endif
Does this work on your system ?
Cheers
Nick
More information about the Binutils
mailing list