facebook

JSP default encoding

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #216974 Reply

    How to set JSP (and other MyEclipse editors) to use UTF-8 as default encoding?

    Even when Preferences page for JSP editor is set to ISO-10646/UTF-8 when creating new files default encoding is always ISO-8859-1.

    I use version 3.8.2 on Eclipse 3.0.1 with Workspace encoding set to UTF-8

    KB

    #216994

    Riyad Kalla
    Member

    KB,
    How do you know that the encoding for new files is always set to ISO-8859-1? I just double checked the jsp templates (<myeclipse dir>\eclipse\plugins\com.genuitec.eclipse.wizards_3.8.2\Templates) and none of them have encoding attributes in the @page directive to specify an encoding.

    You can ADD an encoding attribute to the templates, the editor will honor that.

    #217130

    It is correct that JSP template does not specify an encoding. When writing english pages this is not a problem. But i need to write cyrilic so i need to put the encoding in each page. This is not some hard job, but i assumed that Preferences/MyEclipse/Editors/Jsp/(Encoding when creating new files) will apply to new files. When a new JSP is created Eclipse shows ISO-8859-1 as encoding of the file because nothing is explicitly specified. By editing the template file i resolved this issue, however it will be nice in the next version of MyEclipse this preference encoding to be put explicitly in newly created files.

    #217133

    Riyad Kalla
    Member

    How do I check what the encoding for an editor currently is? I’m trying to create a detailed bug report for this…

    Thx!

    #217299

    Just click properties on the JSP file (Alt-Enter). This is the encoding Eclipse report for any text file. In current MyEclipse version all JSP files are in Latin encoding, if you write a cyrilic or greek text when saving Eclipse report a warning that text can not be converted, saving will result in replacing all non-latin chars with “?” .

    #217326

    Riyad Kalla
    Member

    We have determined this to be a bug and are targetting it for 3.8.3, it seems the only way to specify the file type is to specify the contentType on a per-file basis after it has been created.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: JSP default encoding

You must be logged in to post in the forum log in