For completeness must add that I correct the flags for MSVC C++ (Visual Studio 2022) and it works directly with L strings:
set(CMAKE_CXX_FLAGS_RELEASE "/source-charset:utf-8 /execution-charset:utf-8")
or even only:
set(CMAKE_CXX_FLAGS_RELEASE "/utf-8")
(In gcc/g++ this works without any ...
Search found 5 matches
- Wed May 24, 2023 11:38 am
- Forum: Beginners Help
- Topic: How to use UNICODE
- Replies: 6
- Views: 889
- Wed May 24, 2023 11:12 am
- Forum: Beginners Help
- Topic: How to use UNICODE
- Replies: 6
- Views: 889
Re: How to use UNICODE
@CuteAlien, thank, you, very much for this explanation in detail!
Before that I tried Irrlicht with GCC and the Cyrillic font works just fine. This with MSVC not works.
Now, after your explanation I first try to add some compiler flags for MSVC:
set(CMAKE_C_FLAGS_RELEASE "/source-charset:utf-8 /utf ...
Before that I tried Irrlicht with GCC and the Cyrillic font works just fine. This with MSVC not works.
Now, after your explanation I first try to add some compiler flags for MSVC:
set(CMAKE_C_FLAGS_RELEASE "/source-charset:utf-8 /utf ...
- Fri May 19, 2023 4:08 pm
- Forum: Beginners Help
- Topic: How to use UNICODE
- Replies: 6
- Views: 889
Re: How to use UNICODE
I just now see what was the problem - on my system is installed Irrlicht 1.8.4, which can't write unicode text. I try at system with v.1.8.5 and all is OK.
Because my 1.8.4 uses MSVC and this 1.8.5 uses GCC, I will try to update the first to see if only the library version was the problem.
Because my 1.8.4 uses MSVC and this 1.8.5 uses GCC, I will try to update the first to see if only the library version was the problem.
- Fri May 19, 2023 2:35 pm
- Forum: Beginners Help
- Topic: How to use UNICODE
- Replies: 6
- Views: 889
Re: How to use UNICODE
@CuteAlien, my source code is in UTF8, I use VSCode - modern IDE.
- Tue May 16, 2023 5:45 pm
- Forum: Beginners Help
- Topic: How to use UNICODE
- Replies: 6
- Views: 889
How to use UNICODE
I use Font tool to generate Russian font, then load in code:
IGUIFont* font = device->getGUIEnvironment()->getFont("../../font/sogoeuibru.xml");
guie->getSkin()->setFont(font);
guie->getSkin()->setColor(EGDC_BUTTON_TEXT, SColor{255, 255, 255, 100});
auto *t = guie->addStaticText(L"Proba ПРОба my ...
IGUIFont* font = device->getGUIEnvironment()->getFont("../../font/sogoeuibru.xml");
guie->getSkin()->setFont(font);
guie->getSkin()->setColor(EGDC_BUTTON_TEXT, SColor{255, 255, 255, 100});
auto *t = guie->addStaticText(L"Proba ПРОба my ...