Printing and understanding international chars

I think I made some progress. I will try not to mess with file encodings and special compiler parameters.

When you cast a char to an integer, the number represents the character's position on the ASCII table. For example, the sketch below will print:

C
67

void setup() {
  Serial.begin(9600);
  
  char latin = 'C';
  
  Serial.println(latin);
  Serial.println((int)latin);
}

void loop() { }

If I change the char to '[ch915]', it prints:


-108

Why -108? If I make the char unsigned it prints 148. The sketch I want to print Greek chars should work with those numbers (instead of the ISO-8859-7). My questions now are, why does it print a negative number? Is it because its a 8bit unsinged and I declared it as a signed? In what encoding are the chars stored?

Thanks for your answers, you really helped :slight_smile: