[vim/vim] Unicode character ſ is matched as itself and as 's.' (Issue #14294)

43 views
Skip to first unread message

diffsetter

unread,
Mar 25, 2024, 7:14:42 AM3/25/24
to vim/vim, Subscribed

Steps to reproduce

  1. Open a utf8 encoded file in vim containing the line "Die Gleichheit fordert das Nachdenken heraus durch Fragen, die ſich daran knüpfen und nicht ganz leicht zu beantworten ſind."
  2. use :set ignorecase
  3. replace the character ſ by s using :%s/\%u017F/s/g

Expected behaviour

The two occurrences of 'ſ' will be replaced by 's' resulting in "Die Gleichheit fordert das Nachdenken heraus durch Fragen, die sich daran knüpfen und nicht ganz leicht zu beantworten sind." However, the actual result is "Die Gleichheit fordert dasNachdenken herausdurch Fragen, die sich daran knüpfen und nicht ganz leicht zu beantworten sind.", i.e., the two original s characters together with the following character are also replaced by 's' as if I had used the command :%s/s./s/g. See also this discussion.

Version of Vim

9.1.151 but also older like 8.0

Environment

system: x86_64 GNU/Linux
terminal: konsole, linux
$TERM: linux, xterm-256color
$LANG: de_DE.UTF-8, en_GB.UTF-8, C.UTF-8

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294@github.com>

Christian Brabandt

unread,
Mar 25, 2024, 11:13:14 AM3/25/24
to vim/vim, Subscribed

hm, it works with :set regexpengine=1


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294/2018235790@github.com>

diffsetter

unread,
Mar 25, 2024, 12:26:59 PM3/25/24
to vim/vim, Subscribed

hm, it works with :set regexpengine=1

Indeed, it does. But does that mean it's not a bug? I didn't know that option. The help file says: "Note that when using the NFA engine [the one that must have been chosen by vim automatically in this case] and the pattern contains something that is not supported the pattern will not match…" But here something is matched that shouldn't have been matched.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294/2018403633@github.com>

Restorer

unread,
Mar 25, 2024, 12:43:01 PM3/25/24
to vim/vim, Subscribed

It kind of reminds me of this. issues #12579


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294/2018441490@github.com>

Christian Brabandt

unread,
Mar 26, 2024, 1:02:37 PM3/26/24
to vim/vim, Subscribed

yes and also related: #13682


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294/2020994798@github.com>

Christian Brabandt

unread,
Apr 6, 2024, 3:27:47 PM4/6/24
to vim/vim, Subscribed

I checked it and I think I found the issue. However, I have a question. Can I assume correctly, that 'ſ' should match the lower case 's' if ignoring case?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294/2041173545@github.com>

Christian Brabandt

unread,
Apr 9, 2024, 4:56:58 PM4/9/24
to vim/vim, Subscribed

Closed #14294 as completed via 7a27c10.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14294/issue_event/12412833024@github.com>

Christian Brabandt

unread,
Apr 10, 2024, 10:25:54 AM4/10/24
to vim/vim, Subscribed

Reopened #14294.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14294/issue_event/12423088524@github.com>

Yegappan Lakshmanan

unread,
May 31, 2024, 11:40:45 AM5/31/24
to vim/vim, Subscribed

Closed #14294 as completed via yegappan/neovim@f494084.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14294/issue_event/13002539435@github.com>

Christian Brabandt

unread,
Jun 1, 2024, 4:59:29 AM6/1/24
to vim/vim, Subscribed

that was closed unexpectedly. Let's re-open


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14294/2143369240@github.com>

Christian Brabandt

unread,
Jun 1, 2024, 4:59:32 AM6/1/24
to vim/vim, Subscribed

Reopened #14294.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14294/issue_event/13008635209@github.com>

Christian Brabandt

unread,
Jul 30, 2024, 2:45:19 PM7/30/24
to vim/vim, Subscribed

Closed #14294 as completed via 22e8e12.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14294/issue_event/13700010577@github.com>

Reply all
Reply to author
Forward
0 new messages