Eclipse - set the default character encoding of new jsp files to utf-8

In Eclipse development, the default encoding is ISO-8859-1, and Chinese is not supported. So we have to manually modify the encoding every time we create a new file, which is very troublesome. In fact, we can set the default encoding of the file, and there will be no need to modify the encoding when creating a new file in the future.

1. Open Eclipse, click Window to pop up a drop-down list, and select Preference:

2. Then in the pop-up Preference settings, find Web, and click JSP Files, we can see that the character encoding of the default jsp file is ISO-8859-1 (ISO Latin-1)

Insert picture description here
Set Encoding to ISO 10646/Unicode (UTF-8) on the right, click OK to complete all settings, create a new jsp type file, and find that the default character encoding has become UTF-8 ( __ ).

Guess you like

Origin blog.csdn.net/weixin_44556968/article/details/109953228