2 Replies Latest reply on Oct 3, 2006 5:22 PM by rlhr

    Some latin characteres are not rendered properly

      Hello,

      I'm using jboss-seam-1.0.1.GA CVS build 20060917.

      The problem I'm dealing with might not be due to Seam but to JSF. I'm not sure so I thought I'd ask.

      In a properties file, I have all the french translation of the english properties.
      Let say I have the following string in the english file:

      SUMMER = summer


      and in the french one:

      SUMMER = été


      The internationalization works fine, but when I try to create a javascript variable that will hold that value doing the following:

      var test = "#{messages.SUMMER}";


      This will render the following:
      var test = "&# 233;t&# 233;"; // with no space between &# and 233.
      


      Also if I create a remote method that gives me back that string, I get the same &# 233;t&# 233; instead of été.

      When using a <h:outputText> tag inside a view tag, it works fine.

      The xhtml file starts by
      <?xml version="1.0" encoding="ISO-8859-1" ?>
      
      So it should be fine I thought.

      Any clue about what's going on?

      Thanks,

      Richard

        • 1. Re: Some latin characteres are not rendered properly
          pmuir

          You're using facelets? There is a difference (I can't remember what it is off the top of my head, browse the list archive) between what is rendered using #{bean.proprety} and <h:outputText value="#{bean.property}" /> (for which you have the optional escape attribute). How about using

          <h:outputText value="var test = "#{messages.summer}";"/>


          Or similar (escaping the ")

          • 2. Re: Some latin characteres are not rendered properly

            No actually this is some javascript messages I set when the page is loaded.
            So I'm not using facelets there.

            Also when I get back data for display using seam remoting, I get the same type of issue (and is that case, this is pure javascript, no #{messages.summer} tag at all.

            In the html part using facelets, everything works perfectly.