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

Re: [PATCH] userdiff: support regexec(3) with multi-byte support

From
Johannes Sixt <j6t@kdbg.org>
Date
Apr 7, 2023, 10:56 UTC
Message-ID
<a548ca26-2766-1a95-4928-c22063d5d890@kdbg.org>
In-Reply-To
<39eb2a9f-83e0-449e-1157-152c43d49b48@web.de>
Am 07.04.23 um 09:49 schrieb René Scharfe:
Show 9 quoted lines
> Am 07.04.23 um 00:35 schrieb Johannes Sixt:
>> This is not equivalent. The original treated a sequence of non-ASCII
>> characters as a word. The new version treats each individual non-space
>> character (both ASCII and non-ASCII) as a word.
> 
> I assume you mean "The original treated [a single non-space as well as]
> a sequence of non-ASCII characters [making up a single multi-byte
> character] as a word.".  That works as intended by 664d44ee7f (userdiff:
> simplify word-diff safeguard, 2011-01-11).

I misread the original RE. I thought it would lump multiple multi-byte characters together into one word, but it does not; sorry for that. It looks like your suggested replacement is behaviorally identical to the original after all, except perhaps for this one:

> The new one doesn't match multi-byte whitespace anymore.

but I did not find a reference that confirms it. I don't think we need to bend over backwards to keep this compatibility, though.

-- Hannes
Previous: René ScharfeNext: D. Ben Knoble
Message 10 of 13 in “regex compilation error with --color-words”
  1. Eric SunshineMar 29, 2023
  2. Diomidis SpinellisMar 30, 2023
  3. René ScharfeMar 31, 2023
  4. René ScharfeApr 2, 2023
  5. Junio C HamanoApr 3, 2023
  6. René ScharfeApr 3, 2023
  7. userdiff: support regexec(3) with multi-byte supportRené Scharfe, Apr 6, 2023
  8. Johannes SixtApr 6, 2023
  9. René ScharfeApr 7, 2023
  10. Johannes SixtApr 7, 2023
  11. D. Ben KnobleApr 7, 2023
  12. Junio C HamanoApr 7, 2023
  13. Eric SunshineApr 7, 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.