Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Carlos on Jan 22, 2010 06:18
open dhtmlx forum
There are some unrecognizable characters in DHTMLx Scheduler

We input come chinese in DHTMLx Scheduler, there are some unrecognizable characters .

(DHTMLx Scheduler Java connect + MsSQL)

DHTMLx Scheduler use Utf-8 charset?

Can we change come to that we can use orther charset as chinese ?
Answer posted by Alex (support) on Jan 22, 2010 08:09

You can try to use set_encoding method. For example:

grid.set_encoding("iso-88591-1"); /*you should use the appropriate encoding instead of "iso-88591-1"*/

Answer posted on Jan 22, 2010 08:32

I will use DhtmlxScheduler, where  java files I would add set_encoding method.

 String szUserName = request.getParameter("username");
    szUserName = new String(szUserName.getBytes("ISO8859_1"), "GB2312");

Mybe I can use this method :

request.setCharacterEncoding("GB2312");

Thanks!

Answer posted by Support on Jan 22, 2010 10:36
You need to set it on the connector's class

SchedulerConnector c = new SchedulerConnector(conn);
c.set_encoding("GB2312");


If you are using custom java code , encoding need to be set to the request and to the top xml declaration
<?xml version="1.0" encoding="GB2312" ?>
Answer posted on Jan 22, 2010 22:40

I hava add set_encoding method into two files.

Scheduler_BasicConnector.java

Scheduler_RecBehavior.java

SchedulerConnector c = new SchedulerConnector(conn,DBType.MSSQL);
c.set_encoding("GB2312");

But , problem is still!

These characters wirted into Mssql is uncecognizable, but I change date in Mssql datebase it is ok.

So, I think that I will change code with inserted  date into datebase.  

 

Answer posted by Stanislav (support) on Jan 23, 2010 01:28
By default dataprocessor escapes data as utf-8 before sending to the server side, it may be the reason of the problem 
You can try to add the next line to client side initialization code


dp.enableUTFencoding(false);