Ok... I thought I had solved this one. All my components have a .woo that specifies UTF-8. It's a Wonder app and my application constructor calls setDefaultEncoding("UTF-8").

In developmen everything works great. HOWEVER, the embedded app displays characters wrong when the characters are comming from the Strings in the .java file. So for example,

[ MyComponent.java ]

        public String test = "José";

[ MyComponent.html ]

                <wo:str value="$test"/>


I'm beginning to suspect that Eclipse is encoding the text in MacRoman or something else. I right click the .java file and bring up the properties but Eclipse says it is UTF-8, inherited from the parent. But if I copy and paste that piece of code and try pasting it into this Mail message, the characters do not paste correctly.

Hmmm... Has anybody seen anything like this? What's a good way to find out what encoding is being used for the .java file? And does this affect how the String constants in the .java file are encoded in the compiled .class file?

Thanks,
Ricardo




On Mar 13, 2009, at 11:27 PM, Q wrote:

Can you try explicitly creating a woo file for your page component and set the encoding type there as well and see if the problem persists.

Sent from my iPhone

On 14/03/2009, at 11:17 AM, "Ricardo J. Parada" <[email protected]> wrote:


I built a Wonder application that uses three frameworks.

When I run in Eclipse the accented characters in my WO components display correctly.

Then I built the application from the command line using ant. I installed the three frameworks and then built my application package with the three frameworks and Wonder frameworks embedded in the app bundle.

So my first test was to launch the embedded application to make sure it was working correctly and that my web server resources were displayed correctly. However, I noticed that my accented characters no longer display correctly.

My application constructor is as follows:

    public Application() {
        super();

        /* Initialization */

                log.info("Welcome to " + name() + " !");
                setDefaultEncoding("UTF-8");
setDefaultRequestHandler (requestHandlerForKey(directActionRequestHandlerKey()));
    }

I checked eclipse preferences (General : Workspace) and it is setup to UTF-8 encoding. I click on every project and Components folder in my app and frameworks and checked the properties doing option+enter in Eclipse. They are all set up to inherit from the parent and show UTF-8.

Only a few components have a .woo in them and the ones that do are specifying "UTF-8"

What else should I check?  Any ideas?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/qdolan%40gmail.com

This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to