The problem happens in French too (or any other language using accent, and non ASCII characters).
It's because the character sets in Windows GUI and in the DOS box are different.
I don't have a solution however, but I suspect that you can't display greek letters on the console (appart from those defined in the ASCII code page). Note That I may be wrong about this, I'm just guessing... :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The DOS console does in fact have an extended character set. That is, characters are defined from 0 through 255 (decimal). An easy way for you to see them is to write a simple loop function that displays them. That is, something like this:
I haven't tested this code, but you get the idea. It should print the entire extented character set for you. Unfortunately, the extended character set doesn't include all the characters you may want to use.
See Ya
Butch.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I know this routine.
In old DOS, we could set a special code page for the extended ASCII characters (128-255).
In Windows console, it might still be possible using the MODE console command :
mode con cp select=???
where ??? is one of the following :
437 tats-Unis
850 Multilingue (Latin I)
852 Slave (Latin II)
855 Cyrillique (Russe)
857 Turc
860 Portugais
861 Islandais
863 Franais (Canada)
865 Nordique
866 Russe
869 Grec moderne
I've found these information in the Windows XP help for the command MODE.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As far as my understanding of it goes, and it may be wrong, the Console isn't the 'old DOS' exactly. It is a program that emulates many of the features of that DOS so old programs can still be used in the Windows world. And I'm sure you are aware that there are actually two versions available to you.
But anyway, since you know the old command to change your configuration in 'old DOS' why don't you try it with your program. Use the system() command in your program:
system(mode con cp select=???);
and see if that will work.
See Ya
Butch
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Butch, I'm not the original poster. This problem is not an issue for me, but I'm just curious about this subject. :-)
This command is for the new "DOS" (WinXP pro). I've tried it with cmd.exe, not the "command.com". But it doesn't work from within a program...
Maybe it could work from within a real DOS program (DOS16), but I don't have a DOS compiler to try it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I actually just realized that I've made a mistake. It should be:
system("mode con cp select=???");
I would try this myself, but I just got a new computer the other day and haven't had a chance to download Dev-Cpp yet, so I'm unable to test anything on this computer :-(
I'm afraid this is pushing my memory on the old DOS stuff too, so I don't know how much more I'll be able to help out. But this should work because that command is still available (in the DOS console type: help mode) and it gives an explanation of the command, so it is still valid.
By the way, the statement: system("command"); in any C/C++ program just passes along the command to the system. For example, in DOS the command for displaying the directory is dir, so if your program had the statement: system("dir"); the directory would be displayed in the DOS console when you ran your program just as if you had typed it in yourself. This is true of any of the DOS commands, to see a list of them, while in the console type: help
See Ya
Butch
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I use Greek characters for output I get rubbish in my output window in comand line (character) mode
Any HELP from a Greek friend ?
The problem happens in French too (or any other language using accent, and non ASCII characters).
It's because the character sets in Windows GUI and in the DOS box are different.
I don't have a solution however, but I suspect that you can't display greek letters on the console (appart from those defined in the ASCII code page). Note That I may be wrong about this, I'm just guessing... :-)
Hi Everyone:
The DOS console does in fact have an extended character set. That is, characters are defined from 0 through 255 (decimal). An easy way for you to see them is to write a simple loop function that displays them. That is, something like this:
int main(void){
unsigned char ch = 1;
while(!ch++)
printf("%d = %c\n",(int)ch,ch);
return 0;
}
I haven't tested this code, but you get the idea. It should print the entire extented character set for you. Unfortunately, the extended character set doesn't include all the characters you may want to use.
See Ya
Butch.
Yes, I know this routine.
In old DOS, we could set a special code page for the extended ASCII characters (128-255).
In Windows console, it might still be possible using the MODE console command :
mode con cp select=???
where ??? is one of the following :
437 tats-Unis
850 Multilingue (Latin I)
852 Slave (Latin II)
855 Cyrillique (Russe)
857 Turc
860 Portugais
861 Islandais
863 Franais (Canada)
865 Nordique
866 Russe
869 Grec moderne
I've found these information in the Windows XP help for the command MODE.
Hi everyone:
As far as my understanding of it goes, and it may be wrong, the Console isn't the 'old DOS' exactly. It is a program that emulates many of the features of that DOS so old programs can still be used in the Windows world. And I'm sure you are aware that there are actually two versions available to you.
But anyway, since you know the old command to change your configuration in 'old DOS' why don't you try it with your program. Use the system() command in your program:
system(mode con cp select=???);
and see if that will work.
See Ya
Butch
Butch, I'm not the original poster. This problem is not an issue for me, but I'm just curious about this subject. :-)
This command is for the new "DOS" (WinXP pro). I've tried it with cmd.exe, not the "command.com". But it doesn't work from within a program...
Maybe it could work from within a real DOS program (DOS16), but I don't have a DOS compiler to try it.
Thanks for the info Stphane.
I actually just realized that I've made a mistake. It should be:
system("mode con cp select=???");
I would try this myself, but I just got a new computer the other day and haven't had a chance to download Dev-Cpp yet, so I'm unable to test anything on this computer :-(
I'm afraid this is pushing my memory on the old DOS stuff too, so I don't know how much more I'll be able to help out. But this should work because that command is still available (in the DOS console type: help mode) and it gives an explanation of the command, so it is still valid.
By the way, the statement: system("command"); in any C/C++ program just passes along the command to the system. For example, in DOS the command for displaying the directory is dir, so if your program had the statement: system("dir"); the directory would be displayed in the DOS console when you ran your program just as if you had typed it in yourself. This is true of any of the DOS commands, to see a list of them, while in the console type: help
See Ya
Butch