K
kaustubh.deo
I am facing issues printing french chars like [ é ] using printf
function.
I have reproduced this issue with simple C program as follows.
#include <stdio.h>
#include <locale.h>
int main(int argc, char **argv)
{
if (argc > 1)
{
printf("%s\n", argv[1]);
}
return 0;
}
execute this prog from dos prompt passing string say "abc_éèçàù"
where chars following '_' are french chars.
I get a garbled output on command promt. Where as if I debug this
prog(using MS studio), I can see that argv[1] has the proper string.
additional info:
1> default console page is 850
2> Running Windows in french locale.
Does any body why does it happens.
function.
I have reproduced this issue with simple C program as follows.
#include <stdio.h>
#include <locale.h>
int main(int argc, char **argv)
{
if (argc > 1)
{
printf("%s\n", argv[1]);
}
return 0;
}
execute this prog from dos prompt passing string say "abc_éèçàù"
where chars following '_' are french chars.
I get a garbled output on command promt. Where as if I debug this
prog(using MS studio), I can see that argv[1] has the proper string.
additional info:
1> default console page is 850
2> Running Windows in french locale.
Does any body why does it happens.