1 Reply Latest reply on Feb 18, 2009 10:37 AM by wlchung

    Unicode characters in preview and reply problem

    wlchung

      I installed jboss-forums-1.0.0GA-P2.6.1 last week and was blocked by the unicode problem since then.

      The forum portlet was install to JBoss Portal 2.6.5 which was downloaded as binary. These are run on JBoss AS 4.2.2. Database Vendor and Version are MySQL/5045.

      There were no problems for me to create forums categories with names with chinese characters. There were no problems to post chinese character message using the quick input textarea reply under a post. The unicode problem occurred when I try to use the preview or use the post reply button. These led to the more complexity editing textarea reply screen. In it, all the chinese characters in the messages area and the preview area were transformed to special character. 2 chinese characters were changed to 6 special characters 手機.

      In the database, the data stored were wrong too.

      Since the chinese characters message will be correctly input when using the quick input textarea and correctly store in the database, I think my setup for utf-8 unicode in the jboss tomcat is correct.

      Any one has any idea of the problem?

      Thanks in advance.

        • 1. Re: Unicode characters in preview and reply problem
          wlchung

          I think I find the cause of the problem. The form tag uses in the reply/edit/new posting body use
          enctype="multipart/form-data". And this results in the browser does not use the utf-8 encoding even accept-charset="utf-8" is used.

          Google for the whole day did not find any solution. One work around, but with sacrifice, for this case is to use the default enctype, i.e. enctype="application/x-www-form-urlencoded" in form tag. The sacrifice is not able to use the file upload in the same form.