[Geany-devel] Search in files & encodings
ban-ubuntu at xxxxx
Thu Nov 13 18:36:50 UTC 2008
Enrico Tröger a écrit :
> Oh, ok. Now that you say it, it's obvious. We pass always UTF-8 text to
> 'grep' but this doesn't match when the file is encoded in any other
> encoding (and you are using non-Ascii characters).
> I added some code in SVN r3221 to provide an encoding list in the Find
> in Files dialog.
> The set encoding is used to convert the entered search text into and to
> display the search results.
> Actually, the entered search text can be in UTF-8 or in the specified
> encoding though I only tested it with UTF-8 text since this is the most
> common case (everything you select or copy from within Geany is UTF-8,
> always even the file encoding is something else).
> Any feedback is welcome.
Stop me if I say anything stupid, but can't be the research pattern
translated to the encoding of each file to match its encoding?
It sounds me better than only provide an encoding choice, because
choosing an encoding won't really help if some files are in another
encoding. Furthermore, sometimes users don't or won't care (and don't
know) about file encodings, for example if they work with files created
with another editor or another system.
Dunno if it is hard to implement or have a big speed impact, it's just
the better behaviour I see for now.
More information about the Devel