PhpStorm: Convert Folder Encoding to Another

I have a project where there are a lot of files in ISO-8859-15 , and I need to convert them to UTF-8 . If I change one file, he asks: "Do you want to convert - plaplapla", if I say yes, important characters will not ???.

However, since the size of my project file is HUGE, I cannot do this one at a time. By changing the encoding settings from the project parameters, he can change the encoding to utf-8, but all the characters will become ??? (thus no conversion).

So how can I pass PhpStorm to convert all files to utf-8? Is it possible, and if so, how? What is an alternative method?

+4
source share
2 answers

AFAIK this cannot be done for the whole folder at a time .. but it can be done for several files (for example, all files in a specific folder):

  • Select the files you need in the Project panel
  • Use File | File Encoding
  • When asked, make sure you select "convert", and not just "read in a different encoding."

You can repeat this procedure for each subfolder (still much faster than for each file individually).


Another possible alternative is to use something like iconv (or any other similar tool) and do it in the terminal / console.

+6
source

inPHPStorm, . - ISO-8859, UTF-8, , .. UTF-8 .

, :

  • ISO-8859
  • ( ) ISO-8859-1 ISO-8859-15 REOPEN
  • ( ), UTF-8 CONVERT
  • UTF-8

+2

Source: https://habr.com/ru/post/1589186/


All Articles