Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Repeat issue: Using the UseNewDefaultFonts display Cyrillic symbols bug?

Author
Message
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 24th Feb 2018 19:45
Using the UseNewDefaultFonts command I can display Cyrillic symbols by CreateText(1, "Что-нибудь"), but I can't input Cyrillic symbols into the EditBox it shows something like "ǹǺǻǼǽǾáƄŝǥǦƦň".
Is this a bug?

P.S. I've already posted this issue (19th Jul 2017) but it is still there...

The author of this post has marked a post as an answer.

Go to answer

Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 26th Feb 2018 19:48
Sorry guys, I've lied.
When I use agk::CreateText(1, "Привет") - I get something like that "ǹǺǻǼǽň"
And when I use agk::CreateEditBox(1);
agk::SetEditBoxText(EditBoxNum, "Приветики");
I get similar result.

But if I put the text into EditBox from the keyboard - everything is fine.

I have this issue only in Tier2.
Supertino
6
Years of Service
User Offline
Joined: 22nd Jun 2017
Location: Behind you!
Posted: 27th Feb 2018 08:32
Could it be the font it's using does not support Cyrillic?

What happens if your Print("Приветики")

I used Cyrillic in my Santa's workshop game without issue using CreateText() never had need to try an edit box though,.
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 27th Feb 2018 13:17 Edited at: 27th Feb 2018 21:08
The font works fine when I input text through the keyboard.

agk:: Print("Приветики"); // shows ǽǾáǽƄŝǥǥ

I'm using "template_windows_vs2017".
Supertino
6
Years of Service
User Offline
Joined: 22nd Jun 2017
Location: Behind you!
Posted: 27th Feb 2018 19:08
All my observations are in Teir 1.

Is odd you can type and it's correct, does Print("Hello world") show correct?

Might I suggest trying one these https://fonts.google.com/specimen/Roboto fonts for a sanity check.



In Teir 1 the above prints as expected, but then again even using the default font (i.e not manually setting a different font) Print() displays Cyrillic.
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 28th Feb 2018 13:19
The problem is not in the font. Because the font works well if I input text through the keyboard.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 28th Feb 2018 14:52
Maybe try adding an additional line of code that forces it to use the default but new font? It sounds to me it is trying to input text that is a string that doesn't actually match the font, even though typing it directly results in the correct Cyrillic.
This can happen when you cut and paste from other fonts I think?

It's weird that this code below actually works in Tier 1, but doesn't function in Tier 2 ;


Maybe it is a bug of some kind.

I can't seem to be able to change font colours of TrueType Fonts at the moment in Tier 1. Not sure what's up with that either.
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 28th Feb 2018 19:20
I think it's something in the AppGameKit (c++) templates.
puzzler2018
User Banned
Posted: 28th Feb 2018 19:31
as ive mentioned in another thread - i loved to have the KataKana characters - but if i try and copy and paste into a string - then agk kicks them out as full squares - because they live in the extended ascii tables of which certain languages doesnt support - only japenese for the katakana

so if your language say is uk then can only have uk asci code availabilties
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 28th Feb 2018 19:51
Guys, guys! You don't hear me.
I said that if I type the text on the keyboard - it's FINE!
It's wrong ONLY if I'm trying to display Russian letters over the code.

Please, see attached file.
Left box - is from code. Right box - I've inputted text from the keyboard.

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 28th Feb 2018 20:01
no problem - let me test on Tier 2
puzzler2018
User Banned
Posted: 28th Feb 2018 20:13 Edited at: 28th Feb 2018 20:19
In the meantime, have peruse at these

https://stackoverflow.com/questions/2261496/how-to-write-cyrillic-text-in-c-console

http://archives.miloush.net/michkap/archive/2008/03/18/8306597.html

It seems a unicode issue in C

maybe

setlocale(LC_ALL, "Russian");

by good process of elimination that it works in Tier 1 then its not agk
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 28th Feb 2018 22:32 Edited at: 28th Feb 2018 22:35
setlocale(LC_ALL, "Russian");
doesn't work...

If someone could confirm my issue in tier2.

Just with:



and

PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 28th Feb 2018 23:25
Quote: "I think it's something in the AppGameKit (c++) templates."


I would agree. But not sure.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2018 17:46
This post has been marked by the post author as the answer.
It is most likely Visual Studio saving your string as ASCII (or something else) instead of UTF-8. To convert it to UTF-8 go to File->Save <file> As... in Visual Studio, on the Save button is a little drop down box, open that up and choose Save with Encoding..., then in the encoding box select "Unicode (UTF-8 without signature)", it will be near the bottom. Then rebuild your project and it should display the correct string in AGK.

Login to post a reply

Server time is: 2024-04-24 09:03:03
Your offset time is: 2024-04-24 09:03:03