git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] test-ctype: test isascii

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2023, 19:02 UTC
Message-ID
<xmqq3579crsd.fsf@gitster.g>
In-Reply-To
<93793a00-da6a-81b4-348f-cd7b946bb9eb@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 6 quoted lines
>> Yes, that does make sense but it is orthogonal to what sane_ctype
>> wants to address, I would think.
>
> Currently we can only use one or the other variant because our sane
> versions use the same names as the locale-aware ones.  Full overlap
> instead of orthogonality.

Ah, that is true but slightly complicated. As long as the caller of walks the string byte-by-byte and calls ispunct() in each iteration, I do not think any "locale aware ispunct()" do much good to us.

Once callers are made locale aware, I am not sure they would still want to call the isfoo() functions that have been know to be very much byte-oriented.

Thanks.
Previous: René ScharfeNext: René Scharfe
Message 7 of 14 in “test-ctype: test all classifiers”
  1. 0/3 test-ctype: test all classifiersRené Scharfe, Feb 11, 2023
  2. 1/3 test-ctype: test isasciiRené Scharfe, Feb 11, 2023
  3. Junio C HamanoFeb 11, 2023
  4. René ScharfeFeb 12, 2023
  5. Junio C HamanoFeb 13, 2023
  6. René ScharfeFeb 13, 2023
  7. Junio C HamanoFeb 13, 2023
  8. 2/3 test-ctype: test islower and isupperRené Scharfe, Feb 11, 2023
  9. 3/3 test-ctype: test iscntrl, ispunct, isxdigit and isprintRené Scharfe, Feb 11, 2023
  10. 0/3 test-ctype: test all classifiersRené Scharfe, Feb 13, 2023
  11. 1/3 test-ctype: test isasciiRené Scharfe, Feb 13, 2023
  12. 2/3 test-ctype: test islower and isupperRené Scharfe, Feb 13, 2023
  13. 3/3 test-ctype: test iscntrl, ispunct, isxdigit and isprintRené Scharfe, Feb 13, 2023
  14. Junio C HamanoFeb 13, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.