Ralph Shnelvar wrote:
>> What is actually in the output - utf8 or iso latin 1 (ie look at the
>> generated html with a hex editor) ?
>> 
>> Fred
> 
> I believe it to be iso-8859-1.
> 
> I viewed the page source and saved it to disk.  I hope the relevant 
> sections are
> 
> - - - - - - -
> (From the program WinHex which examined the page source
> 
> Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
> 
> 00000DE0   66 69 72 6D 61 74 69 6F  6E 22 3E 4B 65 6E 6E 77 
> firmation">Kennw
> 00000DF0   6F 72 74 62 65 73 74 E4  74 69 67 75 6E 67 2A 3C 
> ortbestätigung*<
> 00000E00   2F
> 
> - - - - - - -
> 
> (From the screen)
> 
> Kennwortbest�tigung*

Yes, that seems to be Latin-1.  Why are you using Latin-1 and not 
UTF-{8|16} in the first place?  They are supersets of Latin-1.

> 
> - - - - - - -                                                 /
> 
> 
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//DE"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="de" lang="de">
>   <head>
>     <meta http-equiv="Content-Type" content="text/html; 
> charset=iso-8859-1">
>     <title>Sign Up</title>
>     <link href="/stylesheets/application.css?1264903648" media="screen" 
> rel="stylesheet" type="text/css" />
> <link href="/stylesheets/formtastic.css?1265580898" media="screen" 
> rel="stylesheet" type="text/css" />
> <link href="/stylesheets/formtastic_changes.css?1265580898" 
> media="screen" rel="stylesheet" type="text/css" />
>     <script src="/javascripts/jquery-1.4.1.js?1264986334" 
> type="text/javascript"></script>
> <script src="/javascripts/application.js?1263055671" 
> type="text/javascript"></script>
[...]

You've got a number of problems here due to poor development decisions.

* You've declared your document as XHTML, but not used an <?xml ?> 
prolog.  Therefore, it will be interpreted as UTF-8 as described at 
http://www.w3.org/International/O-charset .

* But you shouldn't be generating XHTML anyway.  Browser support for 
XHTML is extremely problematic.  See http://hixie.ch/advocacy/xhtml for 
further information.  Use HTML 4 or 5 instead.  If you use HTML 4, make 
sure to install the html_output plugin so that Rails will not use the 
XML-style <self-closing tag/> syntax, which is not valid in HTML 4.

* But even with HTML 4, I confess I don't see a single reason not to use 
UTF-8 on your pages.  It will handle any character you throw at it, so 
you don't need to use different encodings for different languages.

> - - - - - --
> 
> 
> I have run Mongrel and Webrick and I get the same results.
> 
> I Have run Firefox and IE ... almost the same results
> 
> What's the magic formula for getting the rendering engine to think that 
> the page source is iso-8859-1?
> 
> Once I get that done then I will want to know how to get Ruby/Rails to 
> generate UTF-8 and/or Unicode.

Don't waste your time with Latin-1.  Go straight to UTF-8.  It will be 
easier and more versatile.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://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].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to