PDA

View Full Version : ExtJS Datastore not loading for french character XML response for AJAX request



Shehul
28 Mar 2012, 7:16 AM
Hi,

I am using ExtJS Datastore to load my grid via AJAX call to server.

Most of the time things works but when Server has response like below (French characters) the datastore doesn't load and gives me zero count and clears my grid as well.

<LastKnown>
<Id>1953</Id>
<Address>Autoroute Transcanadienne [Aut-20], Notre-Dame-Du-Sacré-Coeur-D'Issoudu, QC, G0S </Address>
</LastKnown>

You can also try saving the above response as XML and load Mozilla or Chrome, both fails, I know for sure it is encoding issue but don't know how to fix this.

Server side is C# , ASP.NET , I am open to do changes on server as well if needed.

Please reply how to fix this, URGENT,

Thanks,
Shehul

mitchellsimoens
28 Mar 2012, 8:56 AM
have you tried sending the content type header with encoding set?

Shehul
28 Mar 2012, 10:28 AM
Hi

Yes I did tried by Setting Response.Encoding in Server response but still same result.

I also see now in fire bug that its giving me error in content like below,

<address>pid=&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;</address>

I don't know what the hack is &#x0 but it should be considered as string because its between the node address.

Thanks,
Shehul


have you tried sending the content type header with encoding set?