如何使用诸如WebStorm的Jetbrains IDE一次更改所有文件的编码 [英] How to change encoding of all files at once with Jetbrains IDE like WebStorm

查看:50
本文介绍了如何使用诸如WebStorm的Jetbrains IDE一次更改所有文件的编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种未知的原因,我的文件的编码发生了变化,没有引起我的注意.

它是 UTF-8 ,现在是 windows-1252 .我已经从 Settings->文件编码中重置了项目编码,但是我无法检测到哪些文件编码不正确,也无法找出如何立即重新编码项目中的所有文件.

我强烈感觉到WebStorm 10的第一个发行版出现了问题,但我可能是错的.(我认为这是因为它默认将项目编码设置设置为 windows-1252 ))

解决方案

通过单击文件>关闭项目,关闭您打开的每个项目.

一旦它们全部关闭,将显示启动窗口(带有最新打开的项目的窗口以及用于打开新项目的选项,等等.)在该窗口的右下角,您可以进行设置.

在设置">编辑器">文件编码"中.您可以将所有文件编码"选项设置为UTF-8,从现在开始将其添加到新项目中.

如果要用于旧项目,请执行相同的步骤,但是在打开项目后访问设置.

希望有帮助!

For some unknown reason, the encoding of my files has changed without me noticing for a while.

It was UTF-8 and now is windows-1252. I have reset the project encoding from Settings->File encoding but I can't detect which files are badly encoded and can't figure out how to reencode all files within the project at once.

I have a strong feeling that the problem appeared with WebStorm 10 first released version, but I may be wrong. (I think it's because it set by default the project encoding setting to windows-1252)

解决方案

Close every project you have opened by clicking File > Close Project.

Once they are all closed, the startup window will show up (The window with the latest opened projects with the options to open new project, etc..) In that window, at the bottom right corner you have settings.

In Settings > Editor > File Encodings.You can set up all the File Encoding options to UTF-8, it will be added to the new projects from now on.

If you want it for old projects, do the same steps, but access the settings once you have the project open.

I hope this help!

这篇关于如何使用诸如WebStorm的Jetbrains IDE一次更改所有文件的编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆