| Summary: | Project Plugin: A folder with umlaut (ä) ist not shown in tree | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Gregor Mi <codestruct> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nate |
| Priority: | NOR | ||
| Version First Reported In: | 17.12.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/kate/a59237913165c12cdeea53d2839618d780561464 | Version Fixed/Implemented In: | KDE Applications 18.04 |
| Sentry Crash Report: | |||
|
Description
Gregor Mi
2018-01-25 15:42:08 UTC
Which encoding are you using in your system (LANG). Does it work, when you start kate with: LC_ALL=de_DE kate (or was it LANG=de_DE kate ?) $ echo $LANG de_DE.UTF-8 # LC_ALL does not exist. $ export LC_ALL=de_DE $ kate Now the file in the "Der-Bäcker" folder is not even opened but "New file" is shown; even if I drag&drop the file from dolphin. # Reset LC_ALL $ export LANG=de_DE $ kate Same effect as above: "New file" instead of opening the file. $ export LANG=de_DE.UTF-8 $ kate At least the file is loaded to the editor. The problem is that `git ls-files` outputs: $ git ls-files | grep Der "Der B\303\244cker/L\303\266ffler.txt" DerBaecker/Loeffler.txt So this is wrapped in quotes, which is probably a parsing issue in Kate. Possible fix: https://phabricator.kde.org/D10311 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 |