5 Replies Latest reply on Nov 10, 2009 7:12 AM by gcholakov

    rich:insert encoding problem

      Hi guys,

      I've met the following problem using rich:insert - when I use attribute "src" to display data from a file I set attribute encoding to UTF-8 and everything works fine, displaying cyrrilic without problems. But when I use "content" attribute (which is I need) setting encoding produces no result and I got ????????? symbols for cyrrilic.

      Any ideas, workarounds and etc.?

      Thanks,

      Georgi Cholakov

        • 1. Re: rich:insert encoding problem
          ilya_shaikovsky

          what will be encoded if you will just write h:outputText with the same cyrilic value as for content? If it will be out properly - please rise jira issue on that.

          • 2. Re: rich:insert encoding problem

            Using h:outputText the content is displayed correctly.

            • 3. Re: rich:insert encoding problem
              ilya_shaikovsky

              checked with next simple echo sample:

               <h:form id="myform">
               <h:panelGrid columns="2">
               <h:inputText id="myinput" value="#{userBean.name}">
               <a4j:support event="onkeyup" reRender="outtext, insert" />
               </h:inputText>
               <h:outputText id="outtext" value="#{userBean.name}" />
               <rich:insert content="#{userBean.name}" id="insert"/>
               </h:panelGrid>
               </h:form>


              tried entering words in russian - both components echo'ed them fine.

              • 4. Re: rich:insert encoding problem
                ilya_shaikovsky

                tried under 3.3.3 SNAPSHOT.

                • 5. Re: rich:insert encoding problem

                  Hi Ilya,

                  I took 3.3.3 and tested your code in my web app:

                  <html xmlns="http://www.w3.org/1999/xhtml"
                   xmlns:h="http://java.sun.com/jsf/html"
                   xmlns:a4j="http://richfaces.org/a4j"
                   xmlns:rich="http://richfaces.org/rich">
                  
                  <h:form id="myform">
                   <h:panelGrid columns="2">
                   <h:inputText id="myinput" value="#{userData.fullName}">
                   <a4j:support event="onkeyup" reRender="outtext, insert" />
                   </h:inputText>
                   <h:outputText id="outtext" value="#{userData.fullName}" />
                   <rich:insert content="#{userData.fullName}" id="insert" />
                   </h:panelGrid>
                  </h:form>
                  
                  </html>
                  


                  but the result is still the same: h:outputText results fine, rich:insert results in ????????


                  [img][/img]