Doctype -- utf-8 -- html vs xhtml

I was simply trying to write the DOCTYPE line at the top for UTF-8 and
got confused.

What doctype do I use with rails for utf-8 files?

If I put in all the damn closing tags on paragraphs and hr and br and
all that will the
stuff pass xhml inspection, or will rails insert something I haven’ yet


Rails doesn’t force you to write anything. You can declare whatever
doctype you want.
The doctype shouldn’t have anything to do with what character encoding
you use. You should take care of the character encoding in the meta


In xhtml there are three different doctypes that you can use


You will most likely want to use transitional.

For more info, check out this small xhtml primer.

-Eric G.

Warren S. wrote:

Rails mailing list
[email protected]

Eric G.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs