Community
Participate
Working Groups
Build Identifier: Version: 4.2.1 Buid id: J20120711-1640 By default, workspace encoding inherits system settings and is set into cp1255 for Hebrew. However some functionality requires UTF-8 for proper work. After change the encoding, Hebrew is mocked in existing Java files. The problem was found with Java Servlets, but I believe it exists with other kind of source files. Reproducible: Always Steps to Reproduce: 1. Start Eclipse for J2EE on Windows with Hebrew locale 2. Create dynamic Web project 3. Create a servlet, give package name and the servlet name in Hebrew. The source file will contain some Hebrew - the package name, @WebServlet tag etc. 4. Go to Windows->Preferences and change the workspace encoding from 1255 to UTF-8 Result: Hebrew is replaced with rubbish characters.
Created attachment 218802 [details] screenshot
Switching encoding doesn't "convert" the binary characters in your file from one type to another, so you still have cp1255 binary chars in a file that you want read as UTF-8, and they're invalid ... I think that's what's going on. PW
(In reply to comment #2) > Switching encoding doesn't "convert" the binary characters in your file from > one type to another, so you still have cp1255 binary chars in a file that you > want read as UTF-8, and they're invalid ... I think that's what's going on. Correct. You have to set the encoding *before* you create a file. Also note, that it is recommended to set the encoding on the project instead of the workspace. This makes sharing the project easier.
*** This bug has been marked as a duplicate of bug 179187 ***