Thank you, Ramazan Kartal.
-finput-charset=windows-1251 - good
As be if using several language in code ?.
For MortenMacFly.
// main.c
#define UNICODE
#include <windows.h>
//---------------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
wchar_t capt[] = L"Sample text";
wchar_t text_en[] = L"Hello";
wchar_t text_ru[] = L"Привет"; // (russian string) error - converting to execution character set: Illegal byte sequence
MessageBoxExW(NULL, text_en, capt, MB_OK, 0);
MessageBoxExW(NULL, text_ru, capt, MB_OK, 0);
return 0;
}
//---------------------------------------------------------------------------
/*
OS - Windows Vista Ultimate x64 version 6.0.6000 (build 6000), russian (cp1251)
IDE - Code::Blocks 8.02 Build: Feb 27 2008, 20:59:09 (distrib: "codeblocks-8.02mingw-setup.exe", download: 16.03.2008)
Selected compiler - GNU GCC compiler
Project steps:
File->New->Project->Win32GUI->FrameBased
Delete default code
Insert this code (this code as sample)
Build!
Build log:
-------------- Build: Release in proba ---------------
mingw32-gcc.exe -Wall -O2 -c D:\Projects\CodeBlocks\proba\main.c -o obj\Release\main.o
D:\Projects\CodeBlocks\proba\main.c:10:25: converting to execution character set: Illegal byte sequence
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
All !
Enough information ?
*/
(Sorry, i bad speek english)