-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Turkish Characters #1880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, |
I have right font but it doesnt work :/ |
Can you give example source code? |
Apologies, I gave you the wrong answer. The right answer is: Sorry but #1586. |
:D uh, no. I'm not a paster or cheater. |
Please read the documentation. If you say something doesn't work, please provide proper repro code. We can't help you if we don't know what you have tried.
|
@drbiricik: Not sure if this can help you, but for all these kind of problems, I'd also make sure that all the source files I'm using are saved using the UTF8 encoding. I don't know what's the default encoding in Turkey (probably UTF8 already) so I don't know if this can help you or not! 😒 Also I think you should add the code you're using to display the text... |
No, @Flix01 this is not related to encodings -- his encoding is correct. |
@ice1000: OK then... |
String literals in c++ needs to be prefixed with u8 to be encoded as utf-8.
So “xxx” should be u8”xxx”.
Otherwise the exact encoding would be determined by the compiler and probably follow a local codepage which is not the same as utf-8 encoding.
|
it worked. thank you. |
Emre reis yapabildiysen banada kodu yazarmısın? |
Yardım gerekiyorsa ekleyebilirsin, anladığım kadarıyla oyun camiasındasın. |
static const ImWchar icons_ranges_Turkish[] = { 0, }; |
if you are using vs c++ compiler than instead of u8 string literal can also use this. #pragma execution_character_set("utf-8")
....
ImGui::Button("Tıkla bakalım öçşiğüÖÇŞİĞÜ");
.... // from @emrecpp
static const ImWchar icons_ranges_Turkish[] = {
0x0020, 0x00FF, // Basic Latin + Latin Supplement
0x00c7, 0x00c7, // Ç
0x00e7, 0x00e7, // ç
0x011e, 0x011e, // Ğ
0x011f, 0x011f, // ğ
0x0130, 0x0130,// İ
0x0131, 0x0131, // ı
0x00d6, 0x00d6, // Ö
0x00f6, 0x00f6, // ö
0x015e, 0x015e, // Ş
0x015f, 0x015f, // ş
0x00dc, 0x00dc, // Ü
0x00fc, 0x00fc, // ü
0, };
io.Fonts->AddFontFromFileTTF("C:\Windows\Fonts\arial.ttf", 16.0f,0, icons_ranges_Turkish); |
How can display turkish characters in imgui?
The text was updated successfully, but these errors were encountered: