Closed sbianti closed 6 years ago
I think it is by dmitry-kazakov. Its used in src/text/gl-text.adb To use src/text, I'm fairly sure that strings_edit.ads from dmitry-kazakov needs to be installed on your system.
Indeed, is that string_edit project famous ? Absolutely no mention is made on it. I think the maintainer should drop a line on readme.txt
It is mentioned in the documentation of GL.Text
. However, I agree that it should be mentioned somewhere in the readme.
Note that you do not need it unless you depend on opengl-text.gpr
.
btw, the dependency on Strings_Edit exists for the sole reason of decoding UTF-8. I am not very happy about it but I am also not very motivated to implement it myself. Ada 2012 has introduced Ada.Strings.UTF_Encoding
but sadly, that does not include the possibility to iterate over the code points of an UTF-8 encoded string which is what I need. Also I'd like this project to stay Ada 2005 for now.
What would be involved in implementing it. If not too difficult I might have a go myself.
The basic implementation would be fairly simple; the UTF-8 article on Wikipedia should give you enough information to get the job done.
However, a robust implementation should also check for all edge cases (for example, detect invalid byte sequences and raise an appropriate exception). All code points that are no valid unicode characters should also be rejected (this includes surrogate pair halves, see the WTF-8 section in the linked article).
The interface should be similar to Strings_Edit since that one works pretty well.
Looks a bit too complicated for me.
This package is mentioned several times but not implemented in this project. I guess it's some third party stuff (there is a such named project on sourceforge by dmitry-kazakov, but how to guess). Some clarification should be done on this cause no example compiles without it.