No real name Messages: 4 Registered: February 2010
Junior Member
Hi,
I have this web project that was written on Eclipse 3.0 + tomcat 4.1. now when I try to check out this project to my new Eclipse 3.5.1+ tomcat 6, I have this wired encoding problem (I had more other problems but managed to solve them ).
when debugging, I have this simple line:
String str = "Hebrew Word";
I can see the Hebrew word on the Editor just fine, but when the debugger steps over this line, the str variable holds gibberish.
I tried also Glassfish 2.1, the same problem.
mr_van_halen@hotmail.com wrote:
> Hi,
> I have this web project that was written on Eclipse 3.0 + tomcat 4.1.
> now when I try to check out this project to my new Eclipse 3.5.1+
> tomcat 6, I have this wired encoding problem (I had more other
> problems but managed to solve them :)).
>
> when debugging, I have this simple line:
>
> String str = "Hebrew Word";
>
> I can see the Hebrew word on the Editor just fine, but when the
> debugger steps over this line, the str variable holds gibberish.
> I tried also Glassfish 2.1, the same problem.
>
> does anyone has a clue what is going on here?
Make sure that the right encoding is specified in your launch config.
mr_van_halen@hotmail.com wrote:
> Can you please be more specific?
>
> the project based of utf8
> I configured project resource to utf 8.
> What or where else should I check?
Check the 'Common' tab of your Run/Debug configuration.
mr_van_halen@hotmail.com wrote:
> It's utf-8 as well.
>
> I forgot to mention, It's not happening only on debug but at run-time as
> well.
>
> BTW, I am not sure about the older eclipse version that the project was
> running on, it can be even version 2.X.
>
Is your "string" in a JSP file? If so, do you specify something like
<%@ page language="java" pageEncoding="utf-8"
contentType="text/html;charset=utf-8"%>
at the beginning?
You say the debugger has jibbrish, but is it correct if displayed on a
web page? (Not that I'd know what that means ... just curious).