[Info-vax] character set translation for language accents

Steven Schweda sms.antinode at gmail.com
Fri Apr 17 17:28:57 EDT 2009


JF Mezei wrote:

> Ok, perhaps for printf it works. But if you have signed characters, you
> get some interesting problems when doing comparisons.

   Our definitions of "problem" may differ.

> Basically,

   Never trust an explanation which begins, "Basically".

>  it will tell you that e9 is greater than eA. If you have code
> that tests to see if a signed character is greater than 127, it will
> always fail since numerixcally, signed characters that are above 127 end
> up as negative numbers.
>
> If you do bit shifting, signed characters will have the "fill in the
> gap" with the sign bit.

   None of which is equivalent to "does cut off high
order bits when you print/compare them."


glen herrmannsfeldt wrote:

> Watch, though, for the is... macros, such as isalpha.  Most
> are a table lookup which will fail with negative characters.

   Find me a bad one, then tell me to worry about it.



More information about the Info-vax mailing list