eclipse set default encoding (js file)

To make a js file open as UTF-8, you need to do 2 things:

1) Set the default encoding format of the js file to UTF-8;

2) Set the encoding format of the workspace to UTF-8.          

Set the default encoding format of js files to UTF-8                  

 In Windows->Preference page, select General->Content Types                  

In the box on the right, select Text->Javascript,

Change the Default Encoding below to utf-8          

Set the encoding format of workspace to UTF-8                  

In Windows->Preference page, select General->WorkSpace                  

Select Text File encoding in the right box and change to utf-8          

After setting these two places, the default open js file is UTF-8 encoding

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326333563&siteId=291194637