It seems EOF keep the same query encoding and I see no one other than Apple can
fix it.
I remember there was a place to set the eo adaptor text encoding in old version
of WO but never did that. And I don't believe anyone ever tried.
For some other language/text encoding, one way to make it work in windows, at
least for old WO, is to use the that language version of windows. Of course
English will work with all language versions of windows:-). I'm not guessing. I
did Japanese and Chinese. EOF worked ok in that env.
The #1 challenge of WO: language issue with EOF
One can easily verify that as long as not interacting with DB, all the language
encoding issue can be solved.
----- Original Message -----
From: David Griffith
To: Elim PDT
Cc: WebObjects-Dev Mailing List List
Sent: Monday, November 16, 2009 9:55 AM
Subject: Re: UTF8 and ContentEncoding
Yep, I have that in the header and still the same problem. It's one thing or
the other. Either the values from the database display correctly on the page,
but values added from forms do not display correctly on the page but as â¬, or
values from the database display as '?' and values added from the forms DISPLAY
correctly on the page, but get added to the database as â¬. Depends on
whether I override the dispatchRequest() or not, and neither of the above
situations are useful. If anyone fancies having a look at the page online to
see what I mean, please let me know and I'll send you a link. It's driving me
absolutely crazy.
Regards,
David.
On 15 Nov 2009, at 08:39, Elim PDT wrote:
If you don't have the following line in your html head, it definitely a
source of problem:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I never tried wo5* with other languages. Wondering who have any experiences
with utf-8, say Chinese or Russian?
From: David
To: WebObjects-Dev Mailing List List
Sent: Wednesday, November 11, 2009 5:17 AM
Subject: UTF8 and ContentEncoding
Hi all,
I have the following situation:
A database with all tables specified to default to UTF8 encoding.
Adaptor URL containing useUnicode=true&setContentEncoding=UTF8
A record in one table that holds the € currency symbol.
I am loading a WOComponent page to edit values etc., using a form.
Everything was fine and one day all the € symbols started appearing as
'?'. Clearly something changed somewhere on the server but I don't know what.
Anyway, the €msymbols that are appearing this way are displayed by using a
WOString. The value it displays is from defaultCountry which is a variable of
type COUNTRY loaded from the database and stored in the Session class.
€ symbols that were entered on the form, when added to a display group
for example, would appear as â¬.
I've had a look around and what I found was this suggestion:
Put this in Application class:
public void takeValuesFromRequest(WORequest r, WOContext c) {
r.setDefaultFormValueEncoding("UTF8");
super.takeValuesFromRequest(r,c);
}
public void appendToResponse(WOResponse r, WOContext c) {
r.setContentEncoding("UTF8");
super.appendToResponse(r,c);
r.setHeader("text/html;charset=utf-8", "Content-Type");
}
Which I did. It helped to a certain extent. It seemed to fix the
problem with the form values, which now displayed correctly, but the '?' still
appears where the value is displayed with WOString. Then I found another
suggestion:
Put this in Application class:
public WOResponse dispatchRequest(WORequest aRequest) {
aRequest.setContentEncoding("UTF-8");
WOResponse aResponse = super.dispatchRequest(aRequest);
aResponse.setContentEncoding("UTF-8");
return aResponse;
Doing this solved the problem of the '?' but reverted the form values to
display as â¬.
No matter what I do, there doesn't seem to be a way to get them both to
display correctly. Any ideas?
Regards,
David.
--------------------------------------------------------------------------
_______________________________________________
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/elim%40pdtnetworks.net
This email sent to [email protected]
--------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.707 / Virus Database: 270.14.65/2502 - Release Date:
11/14/09 00:43:00
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.707 / Virus Database: 270.14.68/2507 - Release Date: 11/16/09
12:53:00
_______________________________________________
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]