ASCII Extended Characters Support


#1

I would like to know if Cloud9 supports extended ASCII Characters (Above 7Fh). I am using unsigned char and it supports up to 255, however when I call printf, those characters are not visible.
Thanks!


#2

normally that works
could you show the code you are using, and the output of locale command in the terminal?


#3

This is my code, which is supposed to print é

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(void)
{
    unsigned char test = 130;
    printf("%c", test);

    return 0;
 }

The terminal doesn’t show any character:Running “/home/ubuntu/workspace/Test3.c”

Child exited with status 0

Process exited with code: 0


#5

this is not an issue with terminal, since the following works

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(void) {
    printf("-- %s --\n", "բ");
    return 0;
}

try asking on c++ or cs50 related forums why unsigned char doesn’t

(btw you can use ``` to show code in markdown)


#6

I typed the following and for some reason I was not able to print the character either.

```#include <string.h>
#include <stdlib.h>

int main(void) {
    printf("-- %s --\n", "բ");
    printf("Another: %c", 130);
    return 0;
}