Hi all, I seem to loose all the french accentuated characters when I use the Ajax.Updater. When I check my intended result independently, all is fine but the response I get from the updater replaces the ''é'', ''è'' and ''à'' with a ''?''. I tried it with and without the ''<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'' but no luck. Any ideas? Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 4/19/07, nimbus58 <nimbus58-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, >Hi,> I seem to loose all the french accentuated characters when I use the > Ajax.Updater. > When I check my intended result independently, all is fine but the > response I get from the updater replaces the ''é'', ''è'' and ''à'' with a > ''?''.Did you try encodeURIComponent ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey, nimbus58 a écrit :> When I check my intended result independently, all is fine but the > response I get from the updater replaces the ''é'', ''è'' and ''à'' with a > ''?''. > I tried it with and without the ''<meta http-equiv="Content-Type" > content="text/html; charset=iso-8859-1" />'' but no luck.That''s probably because for AJAX, the browser relies on the Content-Type actual header, not HTML-provided <meta>... So on the server side, use the proper header setting. Oh, and iso-8859-1 should go the way of the dodo, it''s SO obsolete. Go UTF-8 while you can. You''ll have to eventually, anyway. BTW, are you actually loading a full page with its <head> through AJAX? What''s the friggin'' point?! -- Christophe Porteneuve aka TDD 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 -~----------~----~----~----~------~----~------~--~---
Merci Christophe. I tried to send a full page to see if it would change something. (it did''nt!) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 20 avr, 04:18, nimbus58 <nimbu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Merci Christophe. > > I tried to send a full page to see if it would change something. (it > did''nt!)I encountered similar problem a couple months ago. You have two solutions : 1. escaping your accented characters with HTML entities (using htmlentities() in PHP), so ''é'' will become ''é'' (Google "HTML entities table" for more info.) 2. use XML and an encoding of UTF-8 (Rico is a good Prototype extension to that solution). Also, you may want to use functions such as PHP''s htmlspecialchars() if you have characters like <, >, &, '' and ". But at least accented characters will be all right. There might be some other solutions, but, personally, I also had similar problems and chose the later solution as it also allow multiple container updates (and more). But as Christophe said, ISO-8859-1 is not a permanent solution. Goog luck. -yanick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---