Discussion:
Searching for non-ASCII strings
(too old to reply)
Loris Bennett
2022-04-12 07:58:38 UTC
Permalink
Hi,

How do I search with G G for non-ASCII strings?

If I search in a group for, say

schung

I get many hits, but with

Löschung

I don't get any.

Cheers,

Loris
--
This signature is currently under construction.
issdr
2022-04-14 06:33:58 UTC
Permalink
Post by Loris Bennett
How do I search with G G for non-ASCII strings?
If I search in a group for, say
schung
I get many hits, but with
Löschung
I don't get any.
i performed a test on imap, by making the following change:

,----[ diff emacs.bak/lisp/gnus/gnus-search*.el ]
| 1108c1108
| < (t (nnimap-command "UID SEARCH %s" query)))))
| ---
| > (t (nnimap-command "UID SEARCH CHARSET UTF-8 %s" query)))))
`----

it seems to be working, but it might break something else, i don't know;
maybe somebody here can check that out and advise.
Loris Bennett
2022-04-22 06:04:33 UTC
Permalink
Post by issdr
Post by Loris Bennett
How do I search with G G for non-ASCII strings?
If I search in a group for, say
schung
I get many hits, but with
Löschung
I don't get any.
,----[ diff emacs.bak/lisp/gnus/gnus-search*.el ]
| 1108c1108
| < (t (nnimap-command "UID SEARCH %s" query)))))
| ---
| > (t (nnimap-command "UID SEARCH CHARSET UTF-8 %s" query)))))
`----
it seems to be working, but it might break something else, i don't know;
maybe somebody here can check that out and advise.
I don't have any gnus-search*.el files, zipped or compiled. The string

UID SEARCH

does appear in the following:

/usr/share/emacs $ grep -r "UID SEARCH" *
grep: 27.1/lisp/net/imap.elc: binary file matches
grep: 27.1/lisp/gnus/nnimap.elc: binary file matches
grep: 27.1/lisp/gnus/nnir.elc: binary file matches

Looks like we have different versions.

Cheers,

Loris
--
This signature is currently under construction.
issdr
2022-04-22 08:49:00 UTC
Permalink
Post by Loris Bennett
/usr/share/emacs $ grep -r "UID SEARCH" *
grep: 27.1/lisp/net/imap.elc: binary file matches
grep: 27.1/lisp/gnus/nnimap.elc: binary file matches
grep: 27.1/lisp/gnus/nnir.elc: binary file matches
the .el of the last one *should* do it. totally untested; you could
modify it and make a load-file to see whether it works or not, before
making it permanent.

gnus-search.el seems pretty much new actually, think it was introduced
in 2020.

Loading...