Martin,
we are checking. From the tests we are making it seems we have a problem in the compiler we are using.
We are making further testing and if confirmed we will send a request to our compiler support help desk.
Eros
Dear Thinbasic experts,
If I run the code below, It outputs wrong characters (Í ÷ Ú. How can I display the correct characters?
uses "console"
printl "Ö ö é"
console_waitkey
if I use MSGBOX instead of PRINTL everything is displayed correct, but I want this to display correct in a console too.
Thanks in advance for your help
Martin
Martin,
we are checking. From the tests we are making it seems we have a problem in the compiler we are using.
We are making further testing and if confirmed we will send a request to our compiler support help desk.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Thanks for letting me know Eros. It also doesn't work correctly with FILE_LinePrint. But maybe I can temporarely solve that by replacing those characters with others.
Greetings,
Martin
whoohoo it seems to work fine with saving in Binary mode, so I can use that.
Martin,
our supposition is that problem seem definitely in compiler and how it treats string literals constants (strings inside double quotes).
It seems to apply always code page 1252 instead of the local code page, in my case 850.
I'm not 100% sure about the above, we are still testing but from all our tests it seems confirmed.
We also think to have found a work around that is to load source code as ascii, transform it into unicode and back to ascii but now forcing code page 850. So when thinBasic loads source code files it will now perform something like:
[code=freebasic]ScriptSourceCode = ACode$(UCode$(ScriptSourceCode), 850)[/code]
_________________________________________________
Can you please test thinCore.dll and see if it solves the problem?
You need latest thinBasic beta 1.7.8.0 installed.
Than keep attached thinCore.dll and place it in \thinBasic\ directory replacing your current one.
If than you can confirm if this solves the problem we can definitely send a support request to Power Basic.
If this thinCore.dll does not resolve the problem we have to search somewhere else.
Thanks
Eros
PS: attention, with this thinCore.dll you cannot create correct bundled exe but you have to wait next thinBasic update.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Hi Again,
I replaced the corefile and then checked only these evil characters: Ö, ö and é but it doesn't solve the problem 
In the console it displays:
Ö as ö (lowercase)
ö as " (which generate an error: "Unrecognized or unsupported char")
é correctly as é
With FILE_LinePrint:
The same problem with ö ("Unrecognized or unsupported char")
Ö is converted to™
and é to ‚
I hope this information is helpfull to you.
Martin
Martin,
forget my previous post with thinCore.dll
Can you please try to add the following line to the script:
[code=thinbasic]console_setoutputcp(1252)[/code]
And see what happen?
Thanks
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Ciao Eros, I did but I still get wrong output
Here that line solves the problem
Can you please check with code page you have as default one?
You can do that using something like:
[code=thinbasic]
USES "CONSOLE"
printl console_Getoutputcp
waitkey
[/code]
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
the result of console_Getoutputcp is: 850
Bookmarks