Picketlink IDM can not store UTF-8 string into MSSQL database correctly
by Tuyen The Nguyen
Hi GateIn team,
When i run GateIn with MSSQL server 2008, i face with a problem that
special UTF-8 character in display name appears not correctly.
The use-case is:
- Run GateIn using MSSQL server instead of HSQL
- Login to user root then update profile with first name, last name and
display name contain special UTF-8 character, for example my name is
"Nguyễn Thế Tuyến"
- After save my profile, display name appears correctly at top-right corner.
- Restart GateIn and login with root again.
Now, display name appears incorrectly at top-right, i goto my profile and
i see my first name, last name and display name appears incorrectly too,
all special UTF-8 character are replaced by "?" character.
I reported issue at https://issues.jboss.org/browse/GTNPORTAL-3530
After spend some time for investigating, i see this problem is caused by PL
IDM can not store UTF-8 string into database correctly.
MSSQL Server requires column type must be NVARCHAR for storing UTF-8 string
but Picketlink IDM generated table with column type is VARCHAR for storing
text value.
I know PL IDM use hibernate, so I tried to find the way to configure
picketlink-hibernate and hope it will generate table column type NVARCHAR
or it can store UTF-8 string in VARCHAR column type but i can't. I have no
more idea to resolve this problem.
May be you can help me with some suggestion about how to store UTF-8 string
with MSSQL Server.
Please, any help is welcome.
Thanks,
Nguyen The Tuyen.
10 years, 2 months