Russian symbols

General questions regarding the usage of CodeLite
Inlight
CodeLite Curious
Posts: 1
Joined: Mon Aug 11, 2008 12:35 pm
Contact:

Russian symbols

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Russian symbols

Post 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
Make sure you have read the HOW TO POST thread
Post Reply