Closed xuchunyang closed 6 years ago
I'm unfortunately not able to reproduce. What's the value of these variables in your session?
magithub-cache
enable-multibyte-characters
magithub-cache
=> when-present
(with-current-buffer "*magit: youdao-dictionary.el"
enable-multibyte-characters)
=> t
magithub-cache-read-from-disk
might be a fault point here if enable-multibyte-characters
isn't set early enough. What's the value of enable-multibyte-characters
when you load magithub? (Probably the best way to test this is to edit your local copy of magithub and restart emacs. On a related note, make sure load-prefer-newer
is t
unless you want to delete all the .elc
files.)
I think enable-multibyte-characters
is always t
(the default) for me since I don't change it.
When I visit the cache file, Emacs also doesn't show it with UTF-8 encoding automatically. I notice the cache files of recentf and bookmark set file local variable coding
to UTF-8, maybe magithub should do the same.
I'm not sure why I'm not having this problem, then.
When I visit the cache file, Emacs also doesn't show it with UTF-8 encoding automatically.
It shows \234\253\...
garbage? When I (find-file (expand-file-name magithub-cache-file magithub-dir))
, it will show the multibyte characters readably.
I delete the cache file then am unable to reproduce the issue, I am not sure why. The deleted cache file is very large (since I have used magithub with many git repos), maybe it contains some invalid UTF-8 byte sequences which prevent Emacs from treating it as UTF-8 file, I can't know as I have deleted the cache file.
Feel free to close the issue because I have no idea how to reproduce it.
Weird.
When I visit the git repo for the first time, magithub displays correctly, but later it doesn't:
I think it only happens when using cache, because I get correct result again right after
C-u h
.By the way, I add two Chinese characters in the issue title, so you can reproduce the issue, maybe you also need to restart Emacs