On Mon, Oct 28, 2019 at 8:14 AM Rob Landley <r...@landley.net> wrote: > > > > On 10/25/19 4:12 PM, Jarno Mäkipää wrote: > > hi > > > > Feel free to ask me if you run into any questions. And also share your > > experiments and results. I have gained some knowledge on utf-8 > > encoding past years. I did internationalization support for > > microcontroller based system around ~2011 on my $DAYJOB. And end up > > writing utf-8 handling and bitmap font rendering as well as bitmap > > font generator that limits glyphs "installed" to system to only the > > ones that exist in translation package to save limited flash memory. > > > > Last spring I started refreshing my memory bit while writing vi > > implementation. But under posix system things are tiny bit easier > > since there is proper c library that provides mbtowc and wcwidth > > etc... > > > > Most languages dont actually use combining characters, but one that I > > find difficult to handle is hindi, even vim/neovim has problems > > stepping around some hindi text I found > > If you could add more tests to the test suite for utf8, that would be lovely. > I > do not have domain expertise here. > > I note the toys/example directory has demo_*.c commands which can have their > own tests/demo_blah.test files (see tests/demo_number.test for example), and > that's the way I test lib/ infrastructure when there isn't really a command > for > it. The tests/files/utf8 directory is just "some stuff I collected". It's not > remotely systematic...
I can try to help writing tests for lib/ utf-8 stuff, and I am sure there is lot of things to do there to do for Andrew also. Anyway there is ton of corner cases. I would also like to know if there would be anyway to do automated testing for VI, ofc I could do it by implementing ex command substitute for every visual mode command and then implement -c option with multiple commands in row parsing. But I feel that implementing ex commands just for testing purposes is bit tedious. And I am not sure if there is visual mode commands that does not have ex mode substitute. So if there would be easy way to push "interactive" command slowly like "5G3dd:wq\n" and then check diff if 3 lines are missing after line 5 or not... -Jarno > > Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net