I''m using redcloth on my blog to transform my input into html. Alot of times if I type "I''ve" I''ll wind up with "I,ve" except that it''s not a comma but a very similar charecter. This is really killing my rss feeds. What''s causing this? How do I fix it? -- Posted via http://www.ruby-forum.com/.
I just figured out that this happens when I cut and paste from open office. How can I stop this? charlie bowman wrote:> I''m using redcloth on my blog to transform my input into html. Alot of > times if I type "I''ve" I''ll wind up with "I,ve" except that it''s not a > comma but a very similar charecter. This is really killing my rss > feeds. What''s causing this? How do I fix it?-- Posted via http://www.ruby-forum.com/.
Charlie, You probably don''t have a character encoding specified in your html code. The browser is more than likely using a default character encoding and when you past from your app, it is using a different one (probably Unicode). Make sure your html looks something like this (or whatever standard you want): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Note the meta tag that sets the character encoding. Chris -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of charlie bowman Sent: Monday, March 20, 2006 1:59 PM To: rails@lists.rubyonrails.org Subject: [Rails] Re: strange charecters after redcloth usage I just figured out that this happens when I cut and paste from open office. How can I stop this? charlie bowman wrote:> I''m using redcloth on my blog to transform my input into html. Alotof> times if I type "I''ve" I''ll wind up with "I,ve" except that it''s not a> comma but a very similar charecter. This is really killing my rss > feeds. What''s causing this? How do I fix it?-- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >May I ask why you recommend utf-8? Is that Ruby''s, MySQL''s, Open Office''s, or some other default? I thought the web standard if one did not specify anything was charset=iso-8859-1 so generally try to use that - but with mixed success. The main things that mess up my applications are things from Microsoft''s character sets like curly quotes. -- Cynthia Kiser cynthia.kiser@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060321/20348432/attachment.html
The first 256 codepoints of UTF-8 are identical to ISO-8859-1, except for 2 that have special meaning to UTF-8. Some UTF-8 interpreters will recognize when these two are followed by illegal characters and process them as ISO-8859-1. On Mon, 2006-03-20 at 17:03 -0800, Cynthia Kiser wrote:> <meta http-equiv="Content-Type" content="text/html; > charset=utf-8" /> > > May I ask why you recommend utf-8? Is that Ruby''s, MySQL''s, Open > Office''s, or some other default? I thought the web standard if one did > not specify anything was charset=iso-8859-1 so generally try to use > that - but with mixed success. The main things that mess up my > applications are things from Microsoft''s character sets like curly > quotes. > > -- > Cynthia Kiser > cynthia.kiser@gmail.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
> charlie bowman wrote:> >>I''m using redcloth on my blog to transform my input into html. Alot of >>times if I type "I''ve" I''ll wind up with "I,ve" except that it''s not a >>comma but a very similar charecter. This is really killing my rss >>feeds. What''s causing this? How do I fix it? > charlie bowman wrote:> I just figured out that this happens when I cut and paste from open > office. How can I stop this?Um, don''t cut and paste from open office? ;-) Sorry, I couldn''t resist... Seriously though, do you have to paste from OO? I''ve seen the same aggravation happen with people writing their web content in Word and then pasting it into an html file. A good text editor is your friend... someone here just turned me on to programmers notepad the other day... pretty sweet. b
A good text editor is indeed your friend. But most folks who use what I would consider a good text editor also hand code their html. I think that Redcloth and other tools to protect the user from that scary html code mostly cater to the crowd who compose in Word. So one of my criteria for a pseudomarkup language or rich text editor is now "how well does it clean up Word''s gunky font tags". -- Cynthia Kiser cynthia.kiser@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060321/a4fdb99b/attachment.html
RedCloth is great for my blog. Who wants to hand code html into each blog post. It''s very nice to compose in open office (thak god fer spelchck) and then submit that to my blog. I just wish I knew how to get the character encoding correct! On Tue, 2006-03-21 at 11:10 -0800, Cynthia Kiser wrote:> A good text editor is indeed your friend. But most folks who use what > I would consider a good text editor also hand code their html. > > I think that Redcloth and other tools to protect the user from that > scary html code mostly cater to the crowd who compose in Word. So one > of my criteria for a pseudomarkup language or rich text editor is now > "how well does it clean up Word''s gunky font tags". > > -- > Cynthia Kiser > cynthia.kiser@gmail.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsCharlie Bowman Programmer Castle Branch Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060321/b7e95630/attachment.html