Z
Zerex71
Zerex71 <[email protected]> kirjutas:
Zerex71 <[email protected]> kirjutas:
Also, help me understand in your example how my code 0x266D gets
turned into "\xE2\x99\xAD".
Presumably this is UTF-8 encoding of your character.
One thing is the encoding your source file uses, and the other is
what you want to output. I'm not familiar with Eclipse so I cannot
comment on the former. If needed, you can use iconv() to convert from
your encoding to UTF-8.
The following program works for me on a SuSE Linux and produces some
kind of music sign on the console. My locale is LANG=en_US.utf8.
#include <stdio.h>
int main() {
const unsigned char test[4]={0xE2, 0x99, 0xAD, 0};
printf("Test: %s\n", test);
}
hth
PaavoI just tried that but it did not work for me - but, I'm running the
console output to the Eclipse console tab, not within an xterm.
Can you check what is your LANG setting in this console? Maybe you should
turn to an Eclipse forum?
hth
Paavo
I don't know if there is a LANG setting for this console, but I will
check. I can check the encoding of the files/project, but that's
about it. I'll see what I can find for this.