Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
None UTF....
03/12/2009
13:51
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Ok, now looks like I am introuble.

How can I use JQGRID with non-utf data coming from the server?

03/12/2009
14:23
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I do not think that this is jqGrid problem.

It all depends on your definition in the html, what is the encoding of the database,

if you use mysql maybe you will need to use set names command with the appropriate encoding before the request and at end you should use the header function to send the appropriate encoding before sending the data to the grid.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

03/12/2009
14:29
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Ok, my HTML is defined for windows-1255.

My DB (DB2/400) works in windows-1255, and with my old window/grid all is ok... 

I cannt use json_encode in php since it works only with UTF8, so I got external class for that.

Attached window: 

http://192.116.242.198:89/remi...../test.html

Without that I cannt continue... 🙁

05/12/2009
14:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I'm not sure if json_encode works only with utf-8. IMHO this is not true. You can see strange chars in the console, but they are dispalyed correct in the browser.

Also you class is not correct written, they give me a error in FireBug console JSON.parse, which tell me that something is not correct.

In order to test with your class maybe you will need to turn off this jqGrid Settings - i.e. set it to false like this

$.jgrid.useJSON = false;

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

10/12/2009
10:37
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Sorry have not understud that...

You want me to close json? to use local data?

Json_encode does tno work with none UTF and that's a fact, but that's PHP problems... not JQGRID.

I have created an example with JSON in non UTF, the charactes you see are hebrew (windows-1255).

11/12/2009
14:23
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Could you please set this

$.jgrid.useJSON = false;


This does not turn JSON off. This turn off the build in JSON.parse in FF35, IE8,Chrome ... browsers
Also turning this option off will cause using of eval insted of buil in JSON.
The reason for this is trivilal - your output is performed with ' (single quote) INSTED OF " (DOUBLE)
The build in JSON does not like single quotes like {'myname':'Some'....}
insted you should
{"myname":"Some"...} in the response.

Regards
Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

15/12/2009
11:20
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Tnanks!!!!!

Your IDEA was incorrect ($.jgrid.useJSON = false; had nothing to do with it), but the remark about the single quote made me check my strings...

what I have found is that I was not converting single quote correctly in my JSON.

THANK YOU!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
67 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information