4 Replies Latest reply on Jan 13, 2010 10:11 AM by ilya_shaikovsky

    comboBox and encoding

      All,

       

      I have this issue with the comboBox and encoding. It doesn't seem to allow "special characters" such as the German Umlaute or, in my case, the Danish equivilants (æ, ø and å).

       

      I've searched the net but haven't been able to come up with a working solution (or one I could get to work). I've been looking at this discussion http://community.jboss.org/thread/14207 but without being able to make it work. I'm currently using MyFaces 1.2.4 and RichFaces 3.3.1 GA but have also tried upgrading to 1.2.8 and 3.3.2 SR1 without any luck.

       

      My comboBox looks like this:

       

      <rich:comboBox id="combo1" defaultLabel="#{msg.choose_subject}"

          buttonStyle="cmdBtnMailbox" inputClass="p" inputStyle="p"

          listHeight="800px" listStyle="p" listWidth="300px"

          value="#{WebpostkasseBean.nytEmne}"

          styleClass="p" required="true" requiredMessage="#{msg.required}">

       

          <f:selectItems id="selitm" value="#{WebpostkasseBean.postkasseEmner}" />

      </rich:comboBox>

       

      No matter where I use the Danish characters (defaultLabel, selectItems or selectItem) they show up as numerical HTML encoding of the Unicode character, just like Roland points out in the discussion I referenced earlier (e.g. my 'æ' shows up as '&#229;' - without the single quotes, of course).

       

      I tried implementing a filter as suggested in the other discussion but also without any luck. Switching to Sun RI is not really an option.

       

      I've tried setting the encoding to UTF-8 and also ISO-8859-1 (as page directive and in the filter) but, again, without any luck.

       

      Just like Roland, I have no problem using Danish characters in any of the other components (e.g. toolTip, inputText etc.).

       

      Any help would be greatly appreciated.

       

      Cheers,

       

      Søren Nødskov Hansen