facebook

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 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #216352 Reply

    msd48
    Member

    I specify workspace default encoding Cp1251 (russian).
    When i saving jsp file with russian text error message occure.

    The encoding (ISO-8859-1) cannot convert some characters….

    Where i must change encoding?


    Thanks, Stas.

    #216358

    Scott Anderson
    Participant

    Stas,

    You can change the default encoding used for JSP files on the JSP editor’s preference page at Window > Preferences > MyEclipse > Editors > JSP. Additionally, you can specify the pageEncoding attribute within your JSP pages.

    #216360

    msd48
    Member

    Your right, but in this location no Cp1251 encoding, exists only ISO-8859-5 and ISO-8859-4.

    I try to change encoding for JSP to ISO-8859-5, but errorr still occure 🙁


    Thanks, Stas.

    #216364

    Scott Anderson
    Participant

    Stas,

    What version of MyEclipse are you using? Encoding enhancements for both the JSP and XML editors were added in 3.8.2. The reason that Cp1251 isn’t listed is because this is a “windows” encoding that isn’t recognized by the XML or JSP specs.

    #216481

    msd48
    Member

    Scott,

    Im using: MyEclipse 3.8.2, Eclipse 3.0.0, Tomcat 5.0.28
    Window > Preferences > Workbench > Editors > Text file encoding set to Default(Cp1251)
    Window > Preferences > MyEclipse > Editors > JSP –> not set (default)
    Window > Preferences > MyEclipse > Editors > XML –> not set (default)

    Simple JSP:

    page language="java" contentType="text/html; charset=Windows-1251"
    <html><head><title>JSP Templates</title></head>
    <body>
    Привет - Hello in russian.
    </body>
    </html>
    

    <%@ %> for code is skipped.

    When i write it with MyEclipse and try to save it – errorr message occurred.

    When i write same JSP without MyEclipse – all be OK.

    Whats wrong?
    Which encoding i must set in
    Window > Preferences > MyEclipse > Editors > JSP
    Window > Preferences > MyEclipse > Editors > XML
    ??


    Thanks, Stas.

    #223183

    eAndrewha
    Member

    Somebody has already solved this problem? How do you sujest to develop Cp1251 JSPs?

    #229671

    rainboy20024
    Member

    i’m sorry ,i have this proplem too,when i am using gb1312

    #231505

    Brian Fernandes
    Moderator

    Encoding preferences and property pages were buggy and have been fixed for ME4.0

    In the meanwhile, for JSP pages, please specify encoding like so at the top of the JSP file.

    
    <%@ page language="java" import="java.util.*" pageEncoding = "CP1251"%>

    for HTML, use the following META tag in <head>

    
    <META http-equiv="Content-Type" content="text/html; charset=CP1251">
    

    GB1312 is not a valid encoding; AFAIK, it’s GB2312. Do the same as above and you should have no problems.

    Brian.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Encoding

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