aboutsummaryrefslogtreecommitdiff
path: root/libbb/unicode.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply post-1.17.3 fixes, bump version to 1.17.41_17_4Denys Vlasenko2010-11-221-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Apply post-1.17.2 fixes, bump version to 1.17.31_17_3Denys Vlasenko2010-10-091-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: fix column display for wide and combining chars in TAB completionTomas Heinrich2010-06-011-3/+14
| | | | | | | | | | | | function old new delta unicode_strwidth - 20 +20 read_line_input 4945 4953 +8 unicode_strlen 31 - -31 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/0 up/down: 28/-31) Total: -3 bytes Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stop using LAST_SUPPORTED_WCHAR and CONFIG_LAST_SUPPORTED_WCHAR, it's confusingDenys Vlasenko2010-05-161-13/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: partially fix wide and combining chars editingTomas Heinrich2010-05-161-1/+1
| | | | | Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/lineedit: add support for preserving "broken" (non-unicode) charsTomas Heinrich2010-04-291-9/+3
| | | | | Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unicode: s/FEATURE_ASSUME_UNICODE/UNICODE_SUPPORT, add UNICODE_USING_LOCALEDenys Vlasenko2010-03-261-7/+427
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unicode: optional table for better handling of neutral bidi charsTomas Heinrich2010-03-261-93/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | Off: function old new delta unicode_bidi_isrtl - 55 +55 isrtl_str 51 65 +14 unicode_isrtl 55 - -55 read_line_input 5003 4937 -66 ------------------------------------------------------------------------------ (add/remove: 1/4 grow/shrink: 1/1 up/down: 69/-121) Total: -52 bytes On: function old new delta static.neutral_b - 320 +320 static.neutral_p - 142 +142 unicode_bidi_isrtl - 55 +55 unicode_bidi_is_neutral_wchar - 55 +55 isrtl_str 51 59 +8 unicode_isrtl 55 - -55 read_line_input 5003 4937 -66 ------------------------------------------------------------------------------ (add/remove: 4/4 grow/shrink: 1/1 up/down: 580/-121) Total: 459 bytes Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: first shot at optional unicode bidi input supportTomas Heinrich2010-03-181-0/+132
| | | | | | | | | | | | | | | | | function old new delta read_line_input 4886 5003 +117 in_uint16_table - 97 +97 in_interval_table - 78 +78 static.rtl_b - 68 +68 unicode_isrtl - 55 +55 isrtl_str - 51 +51 static.rtl_p - 42 +42 unicode_conv_to_printable2 633 477 -156 ------------------------------------------------------------------------------ (add/remove: 6/0 grow/shrink: 1/1 up/down: 508/-156) Total: 352 bytes Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix handling of broken unicode sequencesDenys Vlasenko2010-01-311-22/+25
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* further work on unicodizationDenys Vlasenko2010-01-301-18/+59
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* more fine-grained Unicode supportDenys Vlasenko2010-01-291-16/+70
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* testsuite-discovered fixesDenys Vlasenko2010-01-251-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: better unicode width support. Hopefully fixes bug 839.Denys Vlasenko2010-01-241-57/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also opens up a possibility to make other unicode stuff smaller and more correct later. but: function old new delta static.combining - 516 +516 bb_wcwidth - 328 +328 unicode_cut_nchars - 141 +141 mbstowc_internal - 93 +93 in_table - 78 +78 cal_main 899 961 +62 static.combining0x10000 - 40 +40 unicode_strlen - 31 +31 bb_mbstrlen 31 - -31 bb_mbstowcs 173 102 -71 ------------------------------------------------------------------------------ (add/remove: 7/1 grow/shrink: 1/1 up/down: 1289/-102) Total: 1187 bytes Uses code of Markus Kuhn, which is in public domain: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c "Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted. The author disclaims all warranties with regard to this software." Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: small code shrinks and compile fix for unicodeDenys Vlasenko2010-01-201-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fold: unicode support. Based on a patch by Tomas Heinrich ↵Denys Vlasenko2010-01-041-19/+27
| | | | | | | | | | | | | | | | | | | | <heinrich.tomas@gmail.com> General Unicode support is tweaked to expose unicode_status. function old new delta init_unicode - 77 +77 write2stdout - 19 +19 adjust_column 68 71 +3 unicode_status - 1 +1 unicode_is_enabled 1 - -1 grep_main 780 773 -7 fold_main 619 552 -67 check_unicode_in_env 77 - -77 ------------------------------------------------------------------------------ (add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* widen "Unicode in environment" checkDenys Vlasenko2009-07-161-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit+unicode: code shrinkDenys Vlasenko2009-07-161-22/+14
| | | | | | | function old new delta wcrtomb_internal 161 83 -78 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* comment fixes, no code changesDenys Vlasenko2009-07-161-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tweaking Unicode supportDenys Vlasenko2009-07-111-60/+47
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* added simplified Unicode support for non-locale-enabled buildsDenys Vlasenko2009-07-111-0/+241
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>