[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Writing accented characters into HTML files?
From:       marc <gmane () auxbuss ! com>
Date:       2009-01-06 13:34:11
Message-ID: MPG.23cd7c3628ad0977989b95 () news ! gmane ! org
[Download RAW message or body]

Kenneth McDonald said...
> I'm having trouble when I write accented characters into HTML files;  
> though the accents appear properly in my terminal, they are badly  
> "messed up" in the HTML output. CGI.escape doesn't fix the problem,  
> because these are not "special" characters line < or >, but simply  
> accented e's, o's, etc. I'm assuming the problem has something to do  
> with a character set type mismatch between the file Ruby is writing  
> and what the browser (Firefox) expects, but I'm at a loss as to how to  
> correct it.
> 
> Any advice most appreciated,

Start by ensuring that you have the following at the top of <head>

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

Also, post the "messed up" characters; they'll tell us something about 
the encoding problem.

Oh, and make sure your editor is writing utf-8.

-- 
Cheers,
Marc


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic