flycheck语法检查在win7不支持中文文件名的问题,解决了

这个问题都已经准备放弃中文文件名,以后统一全部用英文的,但折腾一番还是解决了,发出来给道友们参考下,win7、emacs26.3

现在可以用,但有种那天可能就不能用了的感觉,如flycheck升级

(defun flycheck-temp-file-system (filename)
  "Create a temporary file named after FILENAME.
If FILENAME is non-nil, this function creates a temporary
directory with `flycheck-temp-dir-system', and creates a file
with the same name as FILENAME in this directory.
Otherwise this function creates a temporary file with
`flycheck-temp-prefix' and a random suffix.  The path of the file
is added to `flycheck-temporaries'.
Return the path of the file."
  (let ((tempfile (convert-standard-filename
                   (if filename
                       (expand-file-name (file-name-nondirectory filename)
                                         (flycheck-temp-dir-system))
                     (make-temp-file flycheck-temp-prefix)))))

    (push (url-encode-url tempfile);当前缓冲区文件名?
          flycheck-temporaries)
         ;;临时文件名,如果只改这里返回的错误只在flycheck-error-list可见 当前buf见不到
         (url-encode-url tempfile)
    ))