2 Replies Latest reply on Apr 21, 2009 2:09 AM by namisandr

    UTF-8 and seam-gen

    namisandr

      The same old song...


      To test UTF-8 in Seam, I created default app using JBoss Tools (seam-gen), hardcoded static UTF-8 text Утф into home.xhtml view file. Then I run this app on JBoss AS 4.2.2. But generated HTML from home.seam page contained escaped Утф, instead of Утф.


      Though this escaped output looks like Утф in browser, I need it to be Утф in generated output too.


      What am I doing wrong? Help me please. Tired of that damn UTF-8.

        • 1. Re: UTF-8 and seam-gen
          namisandr

          By the way, I looked inside the generated output of this my post and it looks alright for my test UTF-8 phrase. How to achieve this?

          • 2. Re: UTF-8 and seam-gen
            namisandr

            Ok, the problem is solved. To get right UTF-8 in output, text must be non escaped. E.g. if the XHTML source was:


            <h1>УТФ</h1>



            then it must be:


            <h1><h:outputText value="УТФ" escape="false"/></h1>



            Now I have got another question: is there elegant way to escape only <>&" but not the every char except of latin?