coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fold: add the --characters option


From: Collin Funk
Subject: Re: fold: add the --characters option
Date: Thu, 21 Aug 2025 13:39:19 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

PƔdraig Brady <P@draigBrady.com> writes:

>>      if (STREQ_OPT (locale_charset (), "ASCII",
>>                     'A', 'S', 'C', 'I', 'I', 0, 0, 0, 0))
>>        fold_file (...)
>>      else
>>        fold_file_multibyte (...)
>
> Ideally as little would be duplicated as possible,
> but yes that's one way to address the issue.
> Note there is a hard_locale(LC_CTYPE) abstraction to detect this.

CC'ing Bruno since this seems up his alley.

My understanding is that hard_locale checks whether the locale is "C" or
"POSIX" not the character set in use. On some systems like Haiku when
you do LC_ALL=C you are using UTF-8.

Side note, that is annoying thing about Haiku since Coreutils test suite
will fail in many places there only because ā€˜...’ is used instead of
'...'. Having the test suite handle that would be a chore...

Collin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]