![]() ![]() Its name comes from the ed command g/re/p ( global / regular expression search / and print), which has the same effect. Grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Unix, Unix-like, Plan 9, Inferno, OS-9, MSX-DOS, IBM i Of the many files in my workspace only three are "special" where find has some issues.November 1973 49 years ago ( 1973-11) If you have files whose names cannot be expressed in your system codepage, then yes, this is expected. Would I do that with default-process-coding-system, set-buffer-process-coding-system ? I read Coding Systems for Interprocess Communication and I think I need an equivalent of C-x RET p input-coding RET output-coding RET but for the inter-process communication so that input is in the systems codepage yet output in utf-8. In which case try setting things up so that the coding-system Emacs uses for decoding (but NOT for encoding!) ![]() Is the text in the file encoded in UTF-8 or is it encoded in your system's codepage? I think it's the former, Does Dired say that "Prüfungen" has 2 characters for u+umlaut, or just 1 character? You can see that with C-x = in the Dired display, by looking at character positions it shows: does the position changes by 1 or by 2 when you move across ü? No, if the Windows Explorer displays them correctly, they are not in UTF-8. I guess the problem is that these file names are (because of umlauts) utf8-encoded and the ezwinport expects utf16-encoding in file names? The port of find to which I pointed doesn't support non-ASCII file names with characters outside of the current system codepage. I think it's not blanks but maybe "erroneous" encoding of file names Is the text in the file encoded in UTF-8 or is it encoded in your system's codepage? I think it's the former, in which case try setting things up so that the coding-system Emacs uses for decoding (but NOT for encoding!) stuff from find is UTF-8. The only "problem" I have now is that the result is now strangely displayed, instead of e.g. u"fungen.pdfĮDIT: I guess the problem is that these file names are (because of umlauts) utf8-encoded and the ezwinport expects utf16-encoding in file names? I guess the "problem" lies in the file name KnowledgeCheckR_Pru¨fungen.pdf which Windows Explorer as well as dired displays as KnowledgeCheckR_Prüfungen.pdf yet "ez-find" prints it as. Projekte/WKO/BQM/DigitalePrüfungsabwicklung/Präsentationen_Anbieter/KnowledgeCheckR/KnowledgeCheckR_Pru¨fungen.pdf: No such file or directory I think it's not blanks but maybe "erroneous" encoding of file names like in I discovered this "native" nature of this Emacs windows build as M-! echo "ö" > out.txt produces utf16-encoded output?, the "problem" behind grep not finding matches in utf8-encoded files. gefördert I get gefördert which is mildly annoying but alas I find what I ask for.īTW. I extracted and into Emacs/usr (as the windows port prepends emacs/usr/bin to PATH) So I am no longer fighting against your highly-appreciated advice. I'm trying to save you all that confusion, but you need to listen to my advice, not disregard it. The way to have this work for you is to use a native Windows port of find, and invoke rgrep with C-x RET c cp1252 RET M-x rgrep. When I search for an string containing an umlaut, still nothing foundīecause the native Windows build of Emacs doesn't support UTF-8 encoded command-line arguments for child programs, and you ask it to do precisely that. Which is why I advised not to use the Git Bash stuff. But if you use Bash, they will be escaped. If the non-ASCII characters are from your system codepage, you don't want that and don't need them to be escaped. This is because when your shell is Bash, Emacs quotes strings differently. When I rgrep for a string where the containing line contains umlauts, the strings are printed to the compile buffer as unicode escapes If you keep using it, all bets are off, especially for non-ASCII search strings: MSYS2 programs expect UTF-8 encoded non-ASCII arguments, whereas the native Windows build of Emacs doesn't support that. That version of find is an MSYS2 executable, which is subtly incompatible with the native Windows build of Emacs you are using. So back to the git-bash provided find and grep What exactly did you try to "find", and what do you mean by "find certain paths containing blanks"? It can't "find" certain paths containing blanksĭetails, please. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |