PDA

View Full Version : Can't type my native language in ThinAir



kcvinu
26-06-2018, 20:24
Hi all,
I am using ThinBasic Version - 1.10.4.0
My ThinAir version - 1.10.4.0
Windows 8 x86

I can't change the encoding of the script file created by ThinAir, since, there is no option for it. But if open the script file in Notepad++ and change the encoding from ANSI to UTF - 8 BOM, then the script is showing my native language letters correctly. No problem. And i can run the script very well. MsgBoxW is working great. But Only problem is if i type something in my native language, thinAir shows it as question marks. Any help ?

ErosOlmi
26-06-2018, 22:05
I still have to wok a lot on this.

Can you please let me know this:

if you create a simple thinBasic script file using Notepad++ are you able to see it correctly if you open it back in thinAir?
if you copy/paste some text from a text showing your language, does it shows correctly?


Thanks a lot
Eros

Example
9856

kcvinu
27-06-2018, 22:06
Hi Eros,
Thanks for your reply. I have tested as you said.
Case 1 - I've just create a *.tbasic file in notepad++ and edit it in thinAir.
Result - I can read the text clearly in thinAir, but only MsgBoxW can show it. I think GUI components in thinBasic are not supporting unicode. They may be using CreateWindowEx instead of CreateWindowExW.

Case 2 - I have copy paste text from notepad++ to thinAir.
Result - Same as the above result.

Sidenote - Scintilla's internal encoding is UTF-8 by default. Jacob Slusser said it in his GitHub page. But thinAir only creates ANSI files. I think that is the problem.

PS - If thinBasic's native GUI commands are not supporting unicode, then i would like to create my own gui with CreateWindowExW function. All i need an example of how to deal with RegisterClassExW and CreateWindowExW function in thinBasic. I hope you will provide an example when you get enough free time. Thanks in advance.

ErosOlmi
27-06-2018, 22:48
Thanks for testing kcvinu.

I will have a look at default encoding when creating a new file. This seems the problem.

Yes, UI module is still ansi only. I will work on that but will be a long trip :(
Will start with simple controls and see if on the right path.

Ciao
Eros