I''m not a character encoding expert so if these are stupid questions or you''d post a link than waste time explaining it I''ll understand... I have an application that currently uses ISO-8859-1. I believe we did this to allow users to copy paste text from a Word document that may contain funny characters and paste it into IE. This of course doesn''t work that well with Prototype which uses encode/decodeURI which uses UTF-8 when you pass params to Ajax.Request as an object instead of building the query string yourself. Some character become all jumbled after submission. I can change the back-end application if needed. The only requirement is to accept normal text entry and copy-paste from Word into IE into forms that use Ajax.Request. Any ideas? -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
What happens when you code your form with an accept-charset attribute, set to UTF-8? Does IE respect that? <form action="blah" method="post" accept-charset="UTF-8"> Walter On Aug 3, 2007, at 1:19 PM, Michael Peters wrote:> > I''m not a character encoding expert so if these are stupid questions > or you''d > post a link than waste time explaining it I''ll understand... > > I have an application that currently uses ISO-8859-1. I believe we did > this to > allow users to copy paste text from a Word document that may contain > funny > characters and paste it into IE. This of course doesn''t work that well > with > Prototype which uses encode/decodeURI which uses UTF-8 when you pass > params to > Ajax.Request as an object instead of building the query string > yourself. Some > character become all jumbled after submission. > > I can change the back-end application if needed. The only requirement > is to > accept normal text entry and copy-paste from Word into IE into forms > that use > Ajax.Request. Any ideas? > > -- > Michael Peters > Developer > Plus Three, LP > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Michael: For that cases where i need the user to be able to copy & paste from word, i always use TinyMce http://tinymce.moxiecode.com/ You can even customize it to alow or disalows the html tags that gets pasted. http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Walter Lee Davis wrote:> What happens when you code your form with an accept-charset attribute, > set to UTF-8? Does IE respect that? > > <form action="blah" method="post" accept-charset="UTF-8">I doesn''t change anything. The CMS we''re using is 8-bit clean, which means what the users put in, it spits out to the site. Now maybe we still need to publish things to the site like this, but when we''re showing things in the UI we need to encode it as UTF-8 before sending it to the browser? -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> but when we''re showing things in the UI we need to > encode it as UTF-8 before sending it to the browser?Everithing must be set as utf-8: 1) The files need to be saved as utf-8. Even the .js files Its not the same saving a txt file using notepad, that using an editor that saves the file as real utf-8 files, that can include (or exclude) the Unicode Signature (BOM) 2) Your html must have the proper <meta> tag declaration <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 3) You server must be serving the files as utf-8 Sometimes your server is not configured to serve utf-8 files by defaul, so you need to force it to deliver utf-8 stuff 4) You database must be set as uft-8 as well Same as the server, some times you need to force it, otherway you are fucked When one of the 4 things its not doing his job right, real nighmares can happend, and you will end up using a bunch of encoding/deconding functions that will drive you crazy. Only when you have all the combo working in utf-8 you will apreciate his goodness. Are you working with php, asp, ruby? I can help you if php is the case, email me at impallari-Re5JQEeQqe8AvxtiuMwx3w@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 -~----------~----~----~----~------~----~------~--~---