Forum: Ruby on Rails Doctype -- utf-8 -- html vs xhtml

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E6dd9cedee99f9d02e5f87d80ee0e681?d=identicon&s=25 Warren Seltzer (Guest)
on 2006-05-11 21:44
(Received via mailing list)
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
noticed.

Warren
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-05-11 22:32
(Received via mailing list)
Hi,
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
tags.

|<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />|

In xhtml there are three different doctypes that you can use

1.strict
2.transitional
3.frameset

You will most likely want to use transitional.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...

For more info, check out this small xhtml primer.

http://www.yourhtmlsource.com/accessibility/xhtmle...

-Eric Goodwin
ericgoodwin.com






Warren Seltzer wrote:
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric Goodwin
http://www.ericgoodwin.com
This topic is locked and can not be replied to.