0

I`m facing a problem in my request when my values have special characters like á, ã, ó. I have a fieldset with some inputText fields.

The snippet shows what`s happening:

<h:panelGroup id="filter">
   <fieldset>
     <legend>Filter</legend>
        <div class="grid_6">
           <div class="row">
           <div class="leftt">Value:</div>
           <div class="rightt">
               <h:inputText id="value" maxlength="50" size="50" value="#{controller.value}" />
           </div>
           <div class="clearr"></div>
         </div>
    </fieldset>
</h:panelGroup>

<p:commandButton id="search" action="#{controller.find }" 
ajax="true" onclick="dialogStatus.show();"    update="dataTable,status,statusDialog,msgs,filter" value="Find" />

When I insert the value

João

, and hit the find button, it converts it to

João

If I remove the panelGroup, it works normally. Can anyone explain this behavior for me?

I`m using PrimeFaces 2.2, JBoss 4.2.3 and Spring 3.1.0.

gdfbarbosa
  • 825
  • 3
  • 10
  • 21
  • Have you tried adding acceptcharset="UTF-8" to your h:form – Avinash Singh Mar 06 '13 at 05:21
  • Yes, i did. It didn`t work for me in this case. I`m wondering if this is some kind of bug. – gdfbarbosa Mar 06 '13 at 11:01
  • That sound as an encoding problem as this other post: http://stackoverflow.com/questions/13934868/chinese-character-encoding-of-jsf-input Regards, – Rodmar Conde Mar 06 '13 at 12:51
  • This is not the same problem. The current question is facing Mojibake, the question which you linked is facing question marks, which have completely different causes. Plus, please do not post link-only answers. If you can't post a fullworthy answer without the need to click away, rather post a comment. – BalusC Mar 06 '13 at 13:04
  • I don`t think this is a encoding problem. It seems more like a bug to me. I have a workaround for this now, but I want to know if there is some kind of error in my page or perhaps a bug. – gdfbarbosa Mar 06 '13 at 19:21
  • Blub? You don't think this is an encoding problem? How do you explain that the `ã` character which exist in UTF-8 encoding of [bytes `0xC3` and `0xA3`](http://www.fileformat.info/info/unicode/char/00e3/index.htm) which in turn [represent](http://en.wikipedia.org/wiki/ISO_8859-1#Codepage_layout) in the ISO-8859-1 encoding the characters `Ã` and `£` are exactly the characters which you end up seeing in the result? This is a classic school example of bad character encoding. – BalusC Mar 13 '13 at 17:38
  • Thanks for the answer Balus. I`m checking for this error in my app. – gdfbarbosa Mar 21 '13 at 16:26

0 Answers0