Hi, i''m working on an ASP project with prototype.js but i just can''t get special chars to work as they should. I''m using UTF-8 pages but as soon as i call a page containing for example å,ä,ö, < or > it''s replaced with a questionmark. I call the pages using new Ajax.Updater(target, page, {asynchronous:true, evalScripts:true}); Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2006-Nov-11 09:57 UTC
Re: Special characters problem in with Prototype Ajax
Diverge a écrit :> Hi, i''m working on an ASP project with prototype.js but i just can''t > get special chars to work as they should. > I''m using UTF-8 pages but as soon as i call a page containing for > example å,ä,ö, < or > it''s replaced with a questionmark. > I call the pages using > new Ajax.Updater(target, page, {asynchronous:true, evalScripts:true}); > Any ideas?OK, first, what browser(s)? That sounds like the ASP framework is translating your results to a narrower charset for some reason. Your first step is: determine *where* transcoding (with loss) occurs: a) within your ASP code? If so, accessing the same page directly from the browser will produce identical results (''?'') b) After your ASP page was built, by the ASP framework? It likely interprets some HTTP request headers then. Try dumping these headers either on the server side, or on the client side (e.g. use the LiveHTTPHeaders extension on Firefox, which should work for both non-AJAX and AJAX calls. If it doesn''t work for AJAX calls, use Firebug''s XMLHttpRequest monitoring for those) c) In the browser? Check the HTTP *response* headers (Firefox can display those in the Info page, the LiveHTTPHeaders panels, and Firebug''s console). You''re looking for the encoding, hence the Content-Type header''s charset subpart. Let us know. If you can''t figure it out, maybe you can reproduce it online with similar server-side code? Then we could tinker with it. ''HTH -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---