Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask control characters in filenames #118

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Commits on May 22, 2024

  1. Add tuklib_mbstr_nonprint to mask non-printable characters

    In multibyte locales, some control characters are multibyte too, for
    example, terminals interpret C1 control characters (U+0080 to U+009F)
    that are two bytes as UTF-8. Thus, multibyte character sets have to
    be handled.
    
    Instead of checking for control characters with iswcntrl(), this
    uses iswprint() to detect printable characters. This is much stricter.
    
    Gnulib's quotearg would do a lot more but I hope such a thing isn't
    needed here.
    
    Thanks to Ryan Colyer for the discussion about the problems of
    the earlier single-byte-only method.
    
    Thanks to Christian Weisgerber for reporting a bug in an earlier
    version of this code.
    
    Thanks to Jeroen Roovers for a typo fix.
    Larhzu committed May 22, 2024
    Configuration menu
    Copy the full SHA
    dbcb277 View commit details
    Browse the repository at this point in the history
  2. xz: Use tuklib_mbstr_nonprint

    Call tuklib_mask_nonprint() on filenames and also on a few other
    strings from the command line too. The lack of this feature has been
    listed in TODO since 2009: 5f6dddc
    Larhzu committed May 22, 2024
    Configuration menu
    Copy the full SHA
    bc51383 View commit details
    Browse the repository at this point in the history
  3. xzdec: Use setlocale()

    This prepares for tuklib_mask_nonprint() from tuklib_mbstr_nonprint.c.
    It has locale-specific behavior (LC_CTYPE).
    Larhzu committed May 22, 2024
    Configuration menu
    Copy the full SHA
    479b568 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a5e9c3f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7b51612 View commit details
    Browse the repository at this point in the history
  6. Update TODO

    Larhzu committed May 22, 2024
    Configuration menu
    Copy the full SHA
    02b0df8 View commit details
    Browse the repository at this point in the history
  7. Update THANKS

    Larhzu committed May 22, 2024
    Configuration menu
    Copy the full SHA
    3ad4a25 View commit details
    Browse the repository at this point in the history