[Info-vax] character set translation for language accents

Steven Schweda sms.antinode at gmail.com
Fri Apr 17 16:41:15 EDT 2009


JF Mezei wrote:

> If you program in C, you need to have all character variables declared
> as "unsigned char" because "signed char" (the default) does cut off high
> order bits when you print/compare them.

   And you've tried this?  I'd like to see that demonstration.
Around here:

alp $ type uct.c
#include <stdio.h>

void main( void)
{
    char sc;
    unsigned char uc;

    sc = 0xe9;
    uc = 0xe9;
    printf( " sc: >%c<, uc: >%c<.\n", sc, uc);
}
alp $ cc uct
alp $ link uct
alp $ run uct
 sc: >é<, uc: >é<.

I don't see an obvious difference.  I also wouldn't expect
one.  "signed" or "unsigned" affects the way the high bit is
interpreted; neither causes any bits to be lost or ignored.

alp $ show terminal
Terminal: _RTA1:      Device_Type: VT300_Series  Owner: SMS
Remote Port Info: ALP::SYSTEM
[...]
   Wrap               Scope              No Remote          Eightbit
[...]



More information about the Info-vax mailing list