Thread: Character encoding problem in ADF 11 app

This question is answered. Helpful answers available: 3. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: May 13, 2009 1:11 PM Last Post By: user2342849
Andre Goncalves

Posts: 25
Registered: 07/11/08
Character encoding problem in ADF 11 app
Posted: Dec 1, 2008 2:05 PM
 
Click to report abuse...   Click to reply to this thread Reply
I'm developing an application using ADF 11 and, sometimes, when i post a form, every and each accented letter is translated to � (#65533;)

It happens in Firefox and IE, it sounds like a UTF-8 issue, but the browsers are telling me that the page is being encoded in Windows-1252

Does anybody have any clue of what is causing this?

Thanks a lot in advance
Brenden Anstey

Posts: 1,101
Registered: 11/05/03
Re: Character encoding problem in ADF 11 app
Posted: Dec 1, 2008 2:46 PM   in response to: Andre Goncalves in response to: Andre Goncalves
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

what's the character set of the database you are using?

Brenden
Andre Goncalves

Posts: 25
Registered: 07/11/08
Re: Character encoding problem in ADF 11 app
Posted: Dec 2, 2008 4:42 AM   in response to: Brenden Anstey in response to: Brenden Anstey
 
Click to report abuse...   Click to reply to this thread Reply
The problem happens even in non-database driven forms
Andre Goncalves

Posts: 25
Registered: 07/11/08
Re: Character encoding problem in ADF 11 app
Posted: Dec 2, 2008 5:12 AM   in response to: Andre Goncalves in response to: Andre Goncalves
 
Click to report abuse...   Click to reply to this thread Reply
I realized that the <af:inputDate> and <af:popup> are causing the problem

For instance, here's a test anyone can do:

Create and run the following jspx page in Jdev 11.1.1.0.0:

<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<af:document>
<af:form>
<af:panelFormLayout>
<af:inputText label="1 - Type some accented letters"/>
<af:inputDate label="2 - Select one date"/>
<f:facet name="footer">
<af:commandButton text="3 - Click here to submit"/>
</f:facet>
</af:panelFormLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>


In my environment, every accented letter i type in the <af:inputText> becomes � (#65533;)
after i select a date and hit submit
Didier Laurent

Posts: 611
Registered: 01/10/01
Re: Character encoding problem in ADF 11 app
Posted: Dec 2, 2008 11:32 AM   in response to: Andre Goncalves in response to: Andre Goncalves
 
Click to report abuse...   Click to reply to this thread Reply
Hi André,

I can reproduce it - I'll report the issue to our development team
Using utf-8 seems to work correctly.

Regards,

Didier
Didier Laurent

Posts: 611
Registered: 01/10/01
Re: Character encoding problem in ADF 11 app
Posted: Dec 2, 2008 12:10 PM   in response to: Didier Laurent in response to: Didier Laurent
Helpful
Click to report abuse...   Click to reply to this thread Reply
Andre,

I logged Bug 7610071 - CHARACTER ENCODING PROBLEM AFTER USING AF:INPUTDATE OR AF:POPUP

Regards,

Didier.
Anton Gerdessen

Posts: 268
Registered: 11/22/05
Re: Character encoding problem in ADF 11 app
Posted: Jan 13, 2009 6:03 AM   in response to: Didier Laurent in response to: Didier Laurent
Helpful
Click to report abuse...   Click to reply to this thread Reply
Hello,

Add this in the web.xml
  <jsp-config>  
<jsp-property-group>
  <url-pattern>*.jspx</url-pattern>
  <page-encoding>utf-8</page-encoding>
</jsp-property-group> 
  </jsp-config>


And this to your pages just to be sure.
<jsp:directive.page contentType="text/html;charset=utf-8"/>


WHY does JDev use windows encoding?

Luckely I'm using pagetemplates and dont have to set this everywhere...

-Anton
user2342849

Posts: 1
Registered: 05/13/09
Re: Character encoding problem in ADF 11 app
Posted: May 13, 2009 1:11 PM   in response to: Anton Gerdessen in response to: Anton Gerdessen
 
Click to report abuse...   Click to reply to this thread Reply
I fix it as Aston suggest and IT's WORK. Thank you very much.
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums