like..
printf("Olá");
and
printf("Açucar");
á and ç are not allowed..
how i get them suport in c?
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.
Code:>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
>>by the way, i use borland 3.0 on win98
cool!
just thought id specify that. lots of people use different compilers. ascii chars wil have the same value,but well, i thought id tell.Originally Posted by sand_man
Code:>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
Look up the function setlocale. Your default locale is set to "C", which means 7-bit ANSCII.
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.