Charset, encoding JSP file in eclipse is still ISO-8859-1?

I manually changed the default encoding of the JSP file to UTF-8, but when I create a new file with the template $ {encoding}, charset always set to ISO-8859-1 .

How to change eclipse setting so that UTF-8 is the default encoding for JSP files?

+7
source share
5 answers

I think you are asking how you set the template so that $ {encoding} prints UTF-8 , not ISO-8859-1 .

If so, you need to follow:

 Window-->Preferences-->Web-->JSP Files 

and then just use the dropdown to go to ISO 10646/Unicode(UTF-8)

You will also need to do the same for HTML files.

+11
source

I had the same problem, but changed the settings here:

 Preferences -> General -> Content Types -> Text -> JSP -> Default Encoding -> UTF-8 

It worked for me. Hope this helps.

+11
source

perhaps the same "problem" as in Eclipse JSP: incorrect encoding of the text file by default

Add

 <%@ page pageEncoding="UTF-8" %> 

in JSP And check workspace encoding settings as described by Joe

+3
source

In Eclipse, go to Windows β†’ Settings β†’ Web β†’ JSP Files

Select UTF-8 encoding from the * Encoding * drop-down list.

+1
source

I think that the encoding parameter was not set in UTF-8, it needs to be changed from the source it goes to.

0
source

All Articles