idle wrote: Wed Jul 31, 2024 11:12 pm
yes all strings are UCS2 encoded 2 bytes wide
you also have two pseudo types for use with imported function that only accept ascii or utf8 parameters p-ascii and p-utf8
and also two functions ascii(string) utf8(string) which return pointers you need to free them
It doesn't take long to adapt but yes it was a bit of an inconvenience at the time.
----------------------------------------------------------------------------------------------------------------------------------
This change has prevented me from keeping up with the newer releases. I'm stuck in v5.40 as it is now. Looking to adapt I thought maybe I could code around these Unicode issues if I checked the compiler version but that seems to be broken in v6.21. If I run the following code on my Window 11 Pro machine using v6.21 it tells me I am running v5.40:
Code: Select all
Debug #PB_Compiler_Version
Debug #PB_Compiler_Version
I discovered why my program will not work when compiled under v6.21 when I accidentally set my 5.40 compiler to use Unicode and broke some features in my program. Then I went to try my code with that setting disabled in v6.21c but the setting was gone. I the searched history and found that same snippet posted in my OP:
As of 25th July 2016 : Version 5.50
- Removed: ASCII mode for internal PureBasic string representation, PureBasic is now Unicode only.
Consequent to the above I went and downloaded newer releases.
I got v5.46 to replace my 5.40.
And I got v6.30 to replace my 6.21.
Just for the hell of it, knowing that wont necessarily improve my situation -- Just creates more work for me.