projectile
projectile copied to clipboard
Non-latin characters in filenames
All non-latin characters in filenames appear as codes like \ddd. This way them are stored in projectile.cache and displayed in projectile-find-file. If i manually edit cache file everything looks fine so i suppose the reason is the way to store filenames. I wasn't able to google anything related, maybe there are some settings which could affect.
Expected behavior
All files looks fine in projectile-related popups
Actual behavior
Non-Latin characters displayed as codes
Steps to reproduce the problem
In doom emacs open projectile-find-file (SPC SPC) in folder containing file with characters like Cyrillic in name.
тест.txt
for example. Folder should be considered as a project by projectile i.e. contain .projectile
or .git
.
Environment & Version information
https://github.com/hlissner/doom-emacs DOOM emacs v.21.12.0.aplha (c7753adbb301dcb647dc96d182c28b228551890e)
Projectile version information
Projectile 2.6.0-snapshot (3341270781468556bce95dd64ff17ca88b9a507e)
Emacs version
GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26
Operating system
Windows 10
I've made a dumb fix. Doubt if i should make a pr since i have no idea how it may affect performance or if there a simple way to change internal representation instead of making transformation each call. https://github.com/pecheny/projectile/commit/4fa0a9bd349cd704b1e5ebfd47ca63d82b0e5023
Yeah, that'd be very slow on a bigger project. Perhaps we can make such transformations optional - e.g. a list of functions that get applied to project files or something along those lines.
If there is no way to make conversion on the file gathering stage or to change format of data provider functions, ability to add such function (handler? abnormal hook? preprocessor?) would be probably the best option. But i also would suggest adding appropriate record with example to the docs – i spend a while to find a way to convert string to proper format, it wasn't google-friendly issue for me.