EasyUI Forum
June 17, 2024, 09:42:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Poll
Question: datagrid can't show illegal character.
DataGrrid - 0 (0%)
Character - 0 (0%)
Total Voters: 0

Pages: [1]
  Print  
Author Topic: datagrid can't show illegal character.  (Read 4965 times)
frankgao
Jr. Member
**
Posts: 53


View Profile Email
« on: October 06, 2015, 03:06:28 AM »

Hi,
There can't display data with the datagrid when json data include illegal character.
How can realize display illegal character in some special needs.


Code:
{"total":1,"rows":[{"logid":"97033","contents":"\0","ip":"127.0.0.1","builddate":"2015-10-06 17:51:34","emname_st":"abc","sysfunname_cn":""}]}
Logged
rezzonico
Full Member
***
Posts: 184


View Profile
« Reply #1 on: October 06, 2015, 12:04:18 PM »

Did you tryed with the formatter function ?
Logged
frankgao
Jr. Member
**
Posts: 53


View Profile Email
« Reply #2 on: October 06, 2015, 05:09:30 PM »

Did you tryed with the formatter function ?

Thanks.
I format the field value in sql query statement,but I found so many illegal character.
So I want to know is there have some component embed in datagrid can display like html,json,key word data?
Logged
rezzonico
Full Member
***
Posts: 184


View Profile
« Reply #3 on: October 07, 2015, 01:12:28 AM »

I found with google that '\0' is not allowed in json string.

I wrote a small example:
if I force in the json string the character '\0' the datagrid is not populated,
but if I create the json string on server side with the "to_json" function (in my case I use perl) the character '\0' is translated to '\u0000' and the datagrid is displayed correctly.

How do you create the json string on server side and which other special characters are not displayed correctly ?

Regards.
Miche
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!