简体   繁体   English

IntelliJ IDEA 终端特殊字符

[英]IntelliJ IDEA Terminal Special Characters

I recently started using IntelliJ IDEA Ultimate on Windows 10 and would really like to use the integrated terminal.我最近开始在 Windows 10 上使用 IntelliJ IDEA Ultimate,并且非常想使用集成终端。 However, I can't get it to work with special characters like german umlauts or something like §.但是,我无法让它与特殊字符一起使用,例如德国变音符号或诸如 § 之类的东西。

That wouldn't be a problem if i hadn't some folders starting with Ü which i can't rename because they are part of a version control repo.如果我没有一些以 Ü 开头的文件夹,我无法重命名,因为它们是版本控制存储库的一部分,这不会成为问题。 Because of that, i can't cd into these folders.因此,我无法 cd 进入这些文件夹。

For example, an "ü" keystroke shows as "3R" and a "§" keystroke shows as "?"例如,“ü”击键显示为“3R”,“§”击键显示为“?” (like most special chars). (像大多数特殊字符一样)。

It neither works with the default terminal setting (cmd.exe) nor with git bash.它既不适用于默认终端设置 (cmd.exe),也不适用于 git bash。

Has someone encountered a similar problem / has a solution for that?有人遇到过类似的问题/有解决方案吗?

I have had similar issues with IntelliJ Ultimate on Windows 10, regarding language and encoding on the Git Bash integrated Terminal.我在 Windows 10 上的 IntelliJ Ultimate 上遇到了类似的问题,关于 Git Bash 集成终端上的语言和编码。 It was solved by setting the environment variables for the integrated terminal with the correct language.它是通过使用正确的语言为集成终端设置环境变量来解决的。 It can be done as follows:可以按如下方式完成:

  • Go to Settings进入设置
  • Terminal终端
  • Environment variables环境变量

Set two variables: LC_ALL=YOUR_LANGUAGE.utf8;LANG="$LC_ALL" , where YOUR_LANGUAGE is the language code for the desired language.设置两个变量: LC_ALL=YOUR_LANGUAGE.utf8;LANG="$LC_ALL" ,其中YOUR_LANGUAGE是所需语言的语言代码。 I searched a little and I think the correct one for German Umlauts is: de_DE.utf8 .我搜索了一点,我认为德国变音符号的正确位置是: de_DE.utf8 So, the configuration line would be: - LC_ALL=de_DE.utf8;LANG="$LC_ALL"因此,配置行将是: - LC_ALL=de_DE.utf8;LANG="$LC_ALL"

配置设置的屏幕截图

Maybe you can set the file encoding by adding也许您可以通过添加来设置文件编码

-Dfile.encoding=UTF-8

to the idea64.vmoptions configuration file.到idea64.vmoptions 配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM