Character encoding - Ext JS

I'm having some problems with character encoding in the grid.

I'm using json to load the data into the grid. The data contains some special characters (é for example).

When I directly display the result from my query the character is displayed correctly. After json_encoding it the result is:

{"debiteur_id":"1","naam":"name","plaats":"city","adres":"adress","contactpersoon":"nam\u0000"}

As you can see it's now a \u0000.

When displaying the data in the grid firefox just ignores this character (displaying nam, it should have been namé) and ie stops rendering the data.


Adding a CONVERT(col USING ASCII) solves the problem but now ? tokens are displayed, not a very neat solution...


Any ideas?
Reply With Quote
  #2  
Old 02-22-2007, 08:35 AM
Default

Did you set the content type on you server so the browser knows to decode it? You really shouldn't have to do anything manually.
Reply With Quote
  #3  
Old 02-23-2007, 02:46 AM
Default

It seems that json_encode ruined my data by encoding it incorrectly (é resulted in \u0000). I modified the PEAR package Services_JSON to use mb_convert_encoding which seems to work perfectly.
Reply With Quote
  #4  
Old 02-23-2007, 03:17 PM
Default

Anyone managed to use inline editing with a POST to a domino agent, using values containing ?, ?, ?.
All special characters turns out wrong in Domino. If anyone succeeded, please tell me the settings on the server.
Reply With Quote
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值