[Toybox] [PATCH] cut: re-enable crunch_str on cut -C

Jarno Mäkipää jmakip87 at gmail.com
Fri Oct 18 11:23:20 PDT 2019


Since there has been lots of topic about rendering combining
characters I leave this commit here for discussion. crunch_str
currently prints combining characters right. you are free to prove me
wrong

Combining characters follow the character which they modify.
https://www.cl.cam.ac.uk/~mgk25/unicode.html#comb

xterm renders cut test1.txt -C -1 now correctly, other terminal
emulators have different results, but anyway leaving glyph incomplete
would sacrifice that you wont be later able view it inside browser for
example either.
My previous message to board about vi combining chars had some utf-8
with combining characters in it. and my ipad:s browser rendered it
correctly, but this desktop browser did not...

I dont think its good idea to leave glyph imcomplete just because some
terminal emulators misbehave and render combining chars sometimes
after the main glyph. Leaving glyph incomplete without combining
characters could leave word unreadable for user that is actually
reading his own language with his own terminal or browser that
actually works.

I will also attach 2 screenshots into mailinglist where without_crunch
is the old implementation
cut_with_crunch.png
cut_without_crunch.png

regards
-Jarno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cut_with_crunch.png
Type: image/png
Size: 3404 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20191018/5558c64c/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cut-re-enable-crunch_str-on-cut-C.patch
Type: text/x-patch
Size: 2784 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20191018/5558c64c/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cut_without_crunch.png
Type: image/png
Size: 4034 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20191018/5558c64c/attachment-0005.png>


More information about the Toybox mailing list