Hello,

I wish you and your family the best for 2021.

UXStrings library offers a private String type supporting Unicode and dynamic 
length, see:
https://github.com/Blady-Com/UXStrings

UXStrings library has been developed for applications requiring 
internationalization management as those written for the web with Gnoga.
UXStrings is now included in Gnoga 2.1-alpha.

Here are the instructions to get Gnoga 2.1:

% git clone https://git.code.sf.net/p/gnoga/code gnoga-code
% cd gnoga-code
% git checkout dev_2.1

Here are the instructions to build converted test programs:

% make deps basic_components
% make tests-forms           
% make tests-pixi_sprite_test
% make localize

Lets' give a try with forms test program:

% ./bin/forms
Gnoga            :2.1-alpha
Application root :/opt/gnoga-code-2.x/
Executable at    :/opt/gnoga-code-2.x/bin/
HTML root        :/opt/gnoga-code-2.x/html/
Upload directory :/opt/gnoga-code-2.x/upload/
Templates root   :/opt/gnoga-code-2.x/templates/
/js  at          :/opt/gnoga-code-2.x/js/
/css at          :/opt/gnoga-code-2.x/css/
/img at          :/opt/gnoga-code-2.x/img/
Boot file        :debug.html
HTTP listen on   ::8080
Multi-connect application.
Press Ctrl-C to close server.
2021-01-03 21:17:40.97 : HTTP Server Started

Type some text with Unicode characters:


Clic on "send to demo via get":


All unicode characters are well processed, see the converted code:
https://sourceforge.net/p/gnoga/code/ci/1bdbfeb599e4b36ecfae2db1fc4bbe7d113e9302/

A quick way is chosen in masking Standard.String type with a subtype 
declaration:
 9. with UXStrings;
10. 
11. procedure Forms is
12.    use Gnoga;
13.    use Gnoga.Types;
14.    use Gnoga.Gui;
15.    use Gnoga.Gui.Element;
16.    use UXStrings;
17. 
18.    subtype String is UXString;

Starting from scratch, UXStrings is used as any other package, see test 
programs:
https://sourceforge.net/p/gnoga/code/ci/dev_2.1/tree/deps/uxstrings/tests/test_uxstrings.adb
https://sourceforge.net/p/gnoga/code/ci/dev_2.1/tree/deps/uxstrings/tests/test_uxstrings_text_io.adb

There are some limitations:
        • not thread safe
        • single character assignment is not implemented
        • only few API are implemented

Tests have been run on macOS with GNAT Community 2020.

Next considered steps:
1) Convert the remaining Gnoga demos and test programs to UXStrings
2) Implement the remaining UXStrings API
3) Add more API to UXStrings
4) Experience UXStrings with other programs

These steps are equivalent priority, don't hesitate to send feedback about what 
seems more judicious in your opinion.

Enjoy Gnoga, Pascal.
https://blady.pagesperso-orange.fr


_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to