How to configure WebSynergy/Liferay on MySQL for UTF-8

Recently I was using WebSynergy with default database (HSQL in memory) and all my localized data were just doing fine. Happily making trip to UI to Database and vice versa. Then when I switch my database to MySQL , everything went haywire , Data turned in to ??? (okie let me be clear , when Data turns to ??? its mostly case of wrong encoding).

It was small challenge for me to get it right on MySQL. Challenge is Challenge. 

I have explored on MySQL side and found that , it very easy to create database which can handle UTF-8 character (by default it comes in ASCII). so create database to handle WebSynergy data with UTF-8 encoding.

CREATE DATABASE mydb DEFAULT CHARACTER SET utf8; 

 :-) .. am I done .. I did a check but situation refuse to change .. there was something else also needs to be done. To call it done.

Database is in UTF-8 but communication between Portal and Database was not in UTF-8.  How to enable that?

I have found a simple straight way.

Add following two properties to "LiferayPool" and "JIRAPool".

useUnicode=true
characterEncoding=utf8 

.. are we done .. Yes , we are done. Enjoy the advantages of MySQL with WebSynergy in language you want to communicate.

"No Problem is small problem until you know the solution" 




Comments:

Post a Comment:
Comments are closed for this entry.
About

Mahipalsinh Rana

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today