Ansi Escape code - Wrong symbols

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
houmaa.dk/1.PNG
houmaa.dk/2.PNG
Invalid request
Last edited on
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
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
I figured that was something like that...
Do you know how to change that?

Using xp home!!
Last edited on
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.
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)
Try it anyway. See if it's working.
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
Topic archived. No new replies allowed.