Ansi Escape code - Wrong symbols

Sep 14, 2009 at 7:58pm
Hey.. (sry i'm danish, my english might suck..)

I've started on a course, and my computer gives me some other symbols than the rest of the group. When i execute the following:
_____________________________________________________________
#include <stdio.h>
void main()
{
int i, j;
printf(" \t0 1 2 3 4 5 6 7\n");
for (i=12; i<32; i++)
{
printf("%d%d\t", i/8, i%8);
for (j=0; j<8; j++)
{
printf("%c ", (char) (i*8+j));
}
printf("\n");
}
getchar();
return 0;
}_____________________________________________________________

I get this: houmaa.dk/1.PNG
but i should get this: houmaa.dk/2.PNG

It would be really helpful to solve this problem, because if i can't make programming at home.. I'm screwed...
Hope someone can, THX..
Jonas
Sep 14, 2009 at 8:12pm
houmaa.dk/1.PNG
houmaa.dk/2.PNG
Invalid request
Last edited on Sep 14, 2009 at 8:12pm
Sep 14, 2009 at 8:23pm
It's 2 pictures that I've uploaded to my hp-server..

http://houmaa.dk/1.PNG &
http://houmaa.dk/2.PNG

Just added them to my dropbox to:

http://www.getdropbox.com/gallery/2015693/1/C%2B%2B?h=1dcbff
Last edited on Sep 14, 2009 at 8:38pm
Sep 14, 2009 at 8:49pm
Your output is correct. It's just that the two computers (or consoles) that ran the program are using different code pages.
The code page that generates your reference output seems to be code page 850.
Last edited on Sep 14, 2009 at 8:51pm
Sep 14, 2009 at 8:50pm
I figured that was something like that...
Do you know how to change that?

Using xp home!!
Last edited on Sep 14, 2009 at 8:55pm
Sep 14, 2009 at 8:56pm
You're using Windows, right? Control Panel, Regional and Language options, Advanced tab. On the drop box choose the language you'll need. Reboot and then go to the same dialog. Code page 850 in the list below should be enabled (not grayed out) and selected.

I'm very disappointed in whoever made that reference output. Teaching anything other than ASCII and Unicode should be considered a crime.
Sep 14, 2009 at 9:16pm
yes... win xp home..

I found the code page 850 were not checked out.. So I did.. I tried to reboot..
but when i went back to the page code 850 it was still "greyed out"
(see picture 3 in the dropbox)
Sep 14, 2009 at 9:20pm
Try it anyway. See if it's working.
Sep 14, 2009 at 9:25pm
No, I'm sry... didn't work..
Well I need my sleep but thx, for the help..
I will try to figure it out tomorrow..
you're the man :)
Last edited on Sep 14, 2009 at 9:25pm
Topic archived. No new replies allowed.