Mojibake problem
[I use netbeans - jsf 2.2 - primefaces 4.0 - Mysql database]
I use Arabic in my JSF application and unfortunately the Arabic values sent to the server as other characters like this (بÙÙس Ùب ) (seen by debugger) and so stored in database like this.
the project work well at the beginning but after I do some other tasks in my project this problem occur but what cause the problem I do not know
the following solutions done but no effect
use the following line at every jsf page (.xhtml page)
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
use the following filter
<filter>
<filter-name>encoding-filter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encoding-filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
and also I try my written filter
I use the form like this
<h:form acceptcharset="UTF-8" enctype="application/form-data">
Any one can help me