In time I will re-write in html 5, but when I originally wrote the website years ago I do not think 4 0r 5 was available.
On Sep 14, 3:57 pm, Srikanth Shreenivas <[email protected]> wrote: > Also, > check whether using html escaping helps: > > <%= *h* @picture.description %> > > On Tue, Sep 14, 2010 at 6:31 PM, Marnen Laibow-Koser > <[email protected]>wrote: > > > Don Mapp wrote: > > > I have a website that is working fine, except I cannot get it to print > > > out characters other than plain text. > > > *Any* character is plain text. > > > > Characters such as ', :, " and > > > others like degrees print with the dreaded black diamond with a ? > > > inside. > > > Then your actual encoding is Latin-1 (8859-1), but the browser is trying > > to process it as if it were UTF-8. > > > > Anyone has any idea as to how I might overcome this. > > > I want to have my website printing out the above special characters. > > > The concept of "special character" is not really a useful one. They're > > just characters. > > > > I use MySql database to store text which is printed to the screen. > > > This is setup with coliation = Latin1_general_ci, but changing this > > > does not seem to mater. > > > Collation may not matter, but encoding does. Make sure your DB encoding > > is set to something reasonable for your data (generally UTF-8 is a good > > choice). MySQL also has the option of setting column encodings; make > > sure those are correct. > > > > My Layout has the following:- > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > I recommend avoiding XHTML. Use HTML 4 or 5 instead. But that's a > > separate issue. > > > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > > > <head> > > > <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> > > > That looks good. > > > > I have changed UTF-8 without success > > > > The part doing the printing in View-Show is:- > > > > <p class="description"> > > > > <%= @picture.description %> > > > </p> > > > > class description => > > > > font-size:110%; > > > line-height:1.5em; > > > width:90%; > > > text-align:center; > > > margin:auto; > > > The CSS is irrelevant here. > > > What version of Ruby are you using? 1.8 and 1.9 deal with text > > encodings differently. > > > Best, > > -- > > Marnen Laibow-Koser > >http://www.marnen.org > > [email protected] > > > Sent from my iPhone > > -- > > Posted viahttp://www.ruby-forum.com/. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<rubyonrails-talk%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

