Page 1 of 1

Russian symbols

Posted: Tue Aug 26, 2008 6:05 pm
by Inlight
Hi2all. I now try to print in the console Russian symbols, using the next way:

Code: Select all

#include <iostream>
#include <windows.h>

using namespace std;

int main(void)
{
 	char src[10], dest[10];
 	strcpy(src,"Привет"); // string with russian symbols
 	CharToOem(src,dest);
 	cout << dest;
	getchar();
return 0;
}
and symbols in the console look incorrectly. I used this code also with MinGW Studio 2.05, Visual C++ 2008 Express, Codegear C++ and there all was normal. Therefore I have thought, that business in Codelite.

Re: Russian symbols

Posted: Tue Aug 26, 2008 8:24 pm
by eranif
Inlight wrote:Therefore I have thought, that business in Codelite.
The only difference is that codelite does not run the generated executable directly, but rather via le_exe.exe.

Try to run it from outside the IDE (i.e. open cmd.exe at the exe path, and run it) - see if you are still having the same problem.
If the problem disappears, do this in CodeLite:

Open project settings (right click on the project), and un-check the 'pause when execution ends'

If not, then it is something with your locale on the machine or maybe some flags u need to pass to the compiler (try to compare compilation flags).

Eran