mjsibai
Posts: 15
|
Posted: 06/06/2009, 3:23 PM |
|
Special thanks to YesSoftware Support Team
The following steps are required in order to support Arabic in Java projects implemented by CodeCharge Studio 4:
1. Make sure that Project Default HTML Encoding is set to UTF-8
2. In Project Settings -> Locales & Encoding, set file encoding and default HTML Encoding to UTF-8
3. In Project Settings -> Locales & Encoding -> Site Locales, for each locale choose Edit then set Output Encoding to UTF-8
4. Go into each page -> HTML Tab and set the <meta http-equiv="content-type" content="text/html; charset=utf-8">
5. Specify properly connection settings. There should be something like:
MySqlConnection.driver=org.gjt.mm.mysql.Driver
MySqlConnection.url=jdbc:mysql://localhost/DatabaseName?characterSetResults=UTF-8&characterEncoding=UTF-8&useUnicode=yes
Database Properties (One property per line):
characterSetResults=UTF-8
characterEncoding=UTF-8
useUnicode=yes
6. Open your web23.xml file for edit and add the following code to the custom filter block:
<!--CharsetFilter start-->
<filter>
<filter-name>Charset Filter</filter-name>
<filter-class>com.codecharge.util.filters.CharsetFilter</filter-class>
<init-param>
<param-name>requestEncoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Charset Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--CharsetFilter end-->
Best regards,
Mohamad Sibai
|
|
|
|