Foren

Unicode characters on SQL Server 2005

Shawn G, geändert vor 14 Jahren.

Unicode characters on SQL Server 2005

New Member Beiträge: 20 Beitrittsdatum: 28.08.09 Neueste Beiträge
Hello All,

We are currently running Liferay 5.2.3 using Tomcat 6 and SQL Server 2005. We are experiencing a problem when we try to localize portlets in Chinese. The portlet will accept and display the Chinese characters fine until Tomcat is restarted, then all of the double byte characters are replaced with question marks. Chinese characters in themes remain OK after a server restart.

I've seen a few old threads (Liferay 4.x and 5.0) that indicate that the SQL Server tables are set up using varchar instead of nvarchar, and since I don't believe varchar supports UTF-8 this could be the problem. I checked and indeed in 5.2.3 the tables are still varchar. However, this seems like such an important issue I have a hard time believing it's a bug or limitation of Liferay on SQL Server. My instinct says that there is a setting that needs to be changed but if so I haven't been able to find it.

For MySQL there is a ?useUnicode=true parameter that gets appended to the connection string in jdbc.default.url, however this generates an error when used with SQL Server.

We can consider using MySQL if absolutely necessary, but since we are exclusively a SQL Server shop we want to avoid introducing a new database if at all possible.

Any ideas would be greatly appreciated.

Thanks,
SG
thumbnail
Lisa Simpson, geändert vor 14 Jahren.

RE: Unicode characters on SQL Server 2005

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
I'm guessing that you've been bitten by the bug-that-is-not... It happens a lot in liferay. And according tot he developer, it's nto a bug - Check out this ticket on the issue.

So, please, please, go add your concerns to the ticket. If enough of us complain, then perhaps it will get fixed.