like..
printf("Olá");
and
printf("Açucar");
á and ç are not allowed..
how i get them suport in c?
Printable View
like..
printf("Olá");
and
printf("Açucar");
á and ç are not allowed..
how i get them suport in c?
I believe that is a compiler/platform specific issue. What compiler are you using?
If you redirect the out put to say a .txt file, it will work. But it seems like the console doesn't like those characters. I'm using WinXP.
Code:#include <stdio.h>
int main(void){
FILE *fp;
fp=fopen("tmp.txt","w");
fprintf(fp,"Açucar");
return 0;
}
the second character you want is 0x80 .. dont know bout the other one. i remember this one bcoz i was getting it in some program i was experimenting with.
printf("%c".0x80);
thats what i mean . u ll get the second character.
by the way, i use borland 3.0 on win98.
>>by the way, i use borland 3.0 on win98
cool! :rolleyes:
just thought id specify that. lots of people use different compilers. ascii chars wil have the same value,but well, i thought id tell.Quote:
Originally Posted by sand_man
Look up the function setlocale. Your default locale is set to "C", which means 7-bit ANSCII.