Re: New Variation --- My embedded .woa is displaying funny characters
Re: New Variation --- My embedded .woa is displaying funny characters
- Subject: Re: New Variation --- My embedded .woa is displaying funny characters
- From: Chuck Hill <email@hidden>
- Date: Tue, 17 Mar 2009 21:33:21 -0700
BOM is Byte Order Marker.
Other than that, I have no idea.
Chuck
On Mar 17, 2009, at 9:30 PM, Ricardo J. Parada wrote:
In case it helps, if I open the .java file using BBEdit and select
Read as: (autodetect) then BBEdit reads and displays the characters
in the file correctly and then it shows the file is Unicode (UTF-8,
no BOM). I'm not sure what no BOM means. But it seems the file is
encoded using UTF-8. Hmmmm.... this is very odd / annoying. :-/
On Mar 18, 2009, at 12:15 AM, Ricardo J. Parada wrote:
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 development 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@hidden>
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden