https://bugs.kde.org/show_bug.cgi?id=389415

Dominik Haumann <dhaum...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://commits.kde.org/kat
                   |                            |e/a59237913165c12cdeea53d28
                   |                            |39618d780561464
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

--- Comment #5 from Dominik Haumann <dhaum...@kde.org> ---
Git commit a59237913165c12cdeea53d2839618d780561464 by Dominik Haumann.
Committed on 25/02/2018 at 11:38.
Pushed by dhaumann into branch 'master'.

Projects plugin: fix git file listing for umlauts such as äöü

Summary:
git ls-files avoids umlauts or unicode surrogate characters.
The problem is that `git ls-files` outputs:

  $ git ls-files | grep Der
  "Der B\303\244cker/L\303\266ffler.txt"
  DerBaecker/Loeffler.txt

instead of "Der Bäcker\Löffler.txt".
It uses quotes and unicode escape sequences to avoid the ä and ö.

This patch uses `git ls-files -z` for listing the contents. Instead
of \r\n, the file listing the dumps a bytearray that is \0 separated
for each entry.

In the -z mode, no unicode escaping is done, and the umlauts such
as äöü or any other unicode characters are displayed correctly.

There is still room for improvement, since readAllStandardOutput()
might return a very large listing, which allocates a lot of memory.
Therefore, a buffered solution (using a lambda or so) would probably
be better. This, however, can be done in a separate patch.

Test Plan: make test

Reviewers: cullmann, gregormi, ngraham, brauch

Reviewed By: cullmann, brauch

Subscribers: brauch, #kate

Tags: #kate

Differential Revision: https://phabricator.kde.org/D10311

M  +8    -2    addons/project/kateprojectworker.cpp

https://commits.kde.org/kate/a59237913165c12cdeea53d2839618d780561464

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to