bbatsov / projectile

Project Interaction Library for Emacs
https://docs.projectile.mx
GNU General Public License v3.0
3.98k stars 584 forks source link

Garbled code in results returned by 'projectile-grep', 'projectile-ripgrep', 'projectile-ag'(使用上述三个命令搜索文本返回乱码) #1800

Open Shwen-Y opened 1 year ago

Shwen-Y commented 1 year ago

Expected behavior

使用'projectile-grep', 'projectile-ripgrep', 'projectile-ag'搜索时,返回正确结果。 en: Correct results obtained when using 'projectile-grep', 'projectile-ripgrep', 'projectile-ag' to search string in project.

Actual behavior

使用'projectile-grep', 'projectile-ripgrep', 'projectile-ag'搜索时,结果中出现乱码。 en: Garbled code in results returned by 'projectile-grep', 'projectile-ripgrep', 'projectile-ag'。Just like the following:

Steps to reproduce the problem

在win11,中文环境系统,Emacs编码采用UTF-8时,使用上述命令即会出现乱码。 en: Using the above three commands will produce the garbled code in Win11, chinese locale, and Emacs using UTF-8

Environment & Version information

Projectile version information

Projectile 20221004.1327

Emacs version

GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13, text is encoded with UTF-8

Operating system

OS: Windows 11 家庭中文版, version 22H2 , os version: 22621.521

zyxir commented 1 year ago

This may possibly be an encoding issue. I encountered this issue too with consult-ripgrep and rg.el. I am using Windows 10.

zh: 这很可能是编码的问题。我用 consult-ripgreprg 的时候也有这个问题。我用的是 Windows 10。

bbatsov commented 1 year ago

This may possibly be an encoding issue.

I guess so, as Projectile doesn't really do much with the search tools other than passing them a bit of information about the current project.