Version 20.0 BETA - Unicode!
Jun 7, 2021 7:00:31 GMT
Post by Admin on Jun 7, 2021 7:00:31 GMT
Uploaded a new BETA version at:
--->> gui4cli.dckk.net/20.00-Beta.zip
If the link doesn't work - there's a link on the web page at gui4cli.org
This version adds support for Unicode and a couple of other tweaks. I've run all of the guis I use and they work fine, but since this is a big internal change, there will probably be things that don't work. If you see any weird behavior, please report it!
CHANGES:
- UNICODE - now using UTF-8 internally and wide strings (UTF-16) for display
- Incorporated J. Bennet's (Autoit author) code for detecting text encoding (Windows IsTextUnicode() is useless)
- Scied can save scripts in ANSI or UTF-8 (an icon has been added on the side rebar)
- Files (lvs, tvs, etc) will be saved in UTF-8, with an option to save in ANSI, UTF16 etc
- The default SAVE encoding is UTF-8 no BOM.
This can be changed with SET ENCODING ANSI|U8|U8BOM|U16|U16BOM|DEFAULT (default = UTF8)
Possible problems:
Files which are appended to or altered (like INI files for example) and which contain non ascii
characters may get messed up if previously saved in ANSI and now appended to in UTF-8.
- Added GCWIN COLOR R/G/B(pen) R/G/B(back) - to change the colors of the output window.
(These will also be saved in the registry and remembered)
(Added a menu item in Util/OutputMenu.gc for setting them)
- The COLOR attribute now works for non-owner-drawn listviews and treeviews
- Fixed an inconsequential bug with tv notification while quiting
- Made a work-around for a weird bug - there's no system iconlist at start up sometimes
- Made the output window a bit more responsive to entering commands
Notes on UTF-8
UTF-8 has the advantage that it's plain text (8 bit, as it's name implies), meaning that if you only use the normal ASCII characters there is no difference at all to the normal "legacy" ANSI text.
The difference comes when you're dealing with foreign characters. ANSI uses one byte (values 128-256) to express a small set of characters according to the current "code page" you have set windows to, whereas UTF-8 will use multiple bytes to express any of the whole set of Unicode characters.
This is done internally and you'll never know about it, unless you look into a file containing foreign characters. You'll see a bunch of weird characters, more, in number, than the original ones. These can be treated as text.
If you see these in SciEd, you can click on the "G" icon on the side bar, to show them correctly, as unicode.
To display them in listviews, treeviews, titles, etc, Gui4Cli will convert, on-the-fly, the UTF-8 it uses internally, to UTF-16 (16 bit wide characters) which windows uses. Again, this doesn't concern you.
When loading a gui, or a listview, etc, Gui4Cli will check the encoding (using a library written by J. Bennet) and will automatically translate it to UTF-8 internally.
When saving a gui or a listview etc, Gui4Cli will now save it in UTF-8 by default. Usually there will also be a choice to define some other encoding (like ANSI or UTF-16) if you want to. Also, you can globally set the default encoding to whatever you want, using SET ENCODING command.
--->> gui4cli.dckk.net/20.00-Beta.zip
If the link doesn't work - there's a link on the web page at gui4cli.org
This version adds support for Unicode and a couple of other tweaks. I've run all of the guis I use and they work fine, but since this is a big internal change, there will probably be things that don't work. If you see any weird behavior, please report it!
CHANGES:
- UNICODE - now using UTF-8 internally and wide strings (UTF-16) for display
- Incorporated J. Bennet's (Autoit author) code for detecting text encoding (Windows IsTextUnicode() is useless)
- Scied can save scripts in ANSI or UTF-8 (an icon has been added on the side rebar)
- Files (lvs, tvs, etc) will be saved in UTF-8, with an option to save in ANSI, UTF16 etc
- The default SAVE encoding is UTF-8 no BOM.
This can be changed with SET ENCODING ANSI|U8|U8BOM|U16|U16BOM|DEFAULT (default = UTF8)
Possible problems:
Files which are appended to or altered (like INI files for example) and which contain non ascii
characters may get messed up if previously saved in ANSI and now appended to in UTF-8.
- Added GCWIN COLOR R/G/B(pen) R/G/B(back) - to change the colors of the output window.
(These will also be saved in the registry and remembered)
(Added a menu item in Util/OutputMenu.gc for setting them)
- The COLOR attribute now works for non-owner-drawn listviews and treeviews
- Fixed an inconsequential bug with tv notification while quiting
- Made a work-around for a weird bug - there's no system iconlist at start up sometimes
- Made the output window a bit more responsive to entering commands
Notes on UTF-8
UTF-8 has the advantage that it's plain text (8 bit, as it's name implies), meaning that if you only use the normal ASCII characters there is no difference at all to the normal "legacy" ANSI text.
The difference comes when you're dealing with foreign characters. ANSI uses one byte (values 128-256) to express a small set of characters according to the current "code page" you have set windows to, whereas UTF-8 will use multiple bytes to express any of the whole set of Unicode characters.
This is done internally and you'll never know about it, unless you look into a file containing foreign characters. You'll see a bunch of weird characters, more, in number, than the original ones. These can be treated as text.
If you see these in SciEd, you can click on the "G" icon on the side bar, to show them correctly, as unicode.
To display them in listviews, treeviews, titles, etc, Gui4Cli will convert, on-the-fly, the UTF-8 it uses internally, to UTF-16 (16 bit wide characters) which windows uses. Again, this doesn't concern you.
When loading a gui, or a listview, etc, Gui4Cli will check the encoding (using a library written by J. Bennet) and will automatically translate it to UTF-8 internally.
When saving a gui or a listview etc, Gui4Cli will now save it in UTF-8 by default. Usually there will also be a choice to define some other encoding (like ANSI or UTF-16) if you want to. Also, you can globally set the default encoding to whatever you want, using SET ENCODING command.