Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Unwanted caracter appears : the question mark inside a black diamond

666655Mar 24 2009 — edited Mar 26 2009
Hi all,

A noticed something in input components, that did not matter to me since it does not effect my application so much... But I want to figure it out now because it's something bothering for end users.

Here's a use case :
In an input component, like af:inputText, I enter a value like : 'Congés payés' ; notice the accent è and é, that we french people have!
After clicking on an action component that fire an internal program, the navigation is null, so the page refreshes.
And then, the string 'Congés payés' has been transformed to something like :
- Cong�s pay�
- Cong�s pay�

This happens mostly when clicking on an action component that does not navigate, just refresh, or after coming back from a popup.

What should I do to get rid of that ?

Best regards.
Luc-

Comments

655274
I have same problem with Arabic language
667253
Hi..

This problem occurs when you try to input special characters like ' into the database..ADF converts it into something like #234245 (i dont know the exact convention..but it will be similar to this ) which will later be interpreted as those question marks in black diamonds and other such symbols..I guess that is what is happening with the arabic language too :)

Hope this answers your question..

As to how you can get rid of it, i think you need to parse the string which is given as input and handle such special characters manually..there might be an easier and more straightforward solution, though!

Manoj

Edited by: user9546171 on Mar 24, 2009 3:42 AM
666655
Hi,

Impossible to parse the string : the method that uses the input text to process is in the backing bean, in I use getInputText().getValue() to get the value.

With a System.out.println("an input : "+this.getInputText().getValue());

gives :
an input : Cong?s pay?
so ? instead of black diamond, of course.

Maybe there's a place where you set locale, in my case french, and in the other's one arabic.

Luc-
John Stegeman
All,

I didn't post the link from where I copied this short blurb because then people would say "but I'm not using PHP" - the concept applies, however:
It's a character-set issue. Get a tool that inspects the response headers of the server
(like the Firebug extension if you're using Mozilla Firefox) to see what character set the
server response is sending with the content.
john
666655
Hi,

yes thanks you. I just remembered charset before you posted! Of course that's the problem.

It was set to windows-1252 ; i set it to utf-8 : now it's working but the accent charenter in layout elements does not display correctly. Wich is weird because according to http://www.tony-franks.co.uk/UTF-8.htm the accent caracters like é, è or so are into utf-8 charset.

Regards
Luc-
655274
thanx for you ,
chnage Character Set solve problem .

Regards
Wael
666655
Hi,

This issue has been resolved a while ago ; I found this in metalink :

>
"Character encoding problem in ADF 11 app"

.

Problem:

========

.

Page encoding is changed after Submit.

It happens after the end user opened an < af:inputDate> or < af:popup>

.

.

To Reproduce:

=============

.

The problem reproduces with the following page:

.

< ?xml version='1.0' encoding='windows-1252'?>

< 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 like éêüçà"/>

< 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>

.

Run the page, enter some accented characters in the inputText and click the

Submit button -> everything is ok

.

Repeat the operation, but this time select first a date through the calendar

widget before you click Submit.

When you click Submit, the accented characters are changed.

.

.

Workaround

==========

.

It works fine with UTF-8

.

< ?xml version='1.0' encoding='utf-8'?>

...

< jsp:directive.page contentType="text/html;charset=utf-8"/>

...

.



You may have to search for the good set of arabic characters, but it applies however.


Regards
Luc-
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 23 2009
Added on Mar 24 2009
7 comments
3,215 views