Hi, I''m trying to at a select box to my page like so: <%= select(''company'', ''country'', [[''België'', ''BE''], [''Nederland'', ''NL'']]) %> But the ë in België is displayed as ? in Firefox and as || in IE5. I have already placed some html code at the top of the page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title><%= @title %></title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> But that doesn''t solve the problem. Anybody managed to solve it? All help is welcome. Thanks. Kind regards, Nick -- Posted via http://www.ruby-forum.com/.
nicksnels wrote:> Hi, > > I''m trying to at a select box to my page like so: > > <%= select(''company'', ''country'', [[''België'', ''BE''], > [''Nederland'', ''NL'']]) %> > > But the ë in België is displayed as ? in Firefox and as || in IE5.Make sure your editor saves the file in UTF-8 charset. -- Posted via http://www.ruby-forum.com/.
Hi Andreas, changed editor settings to UTF-8 and it worked magically! Thanks!! Nick andreas wrote:> nicksnels wrote: >> Hi, >> >> I''m trying to at a select box to my page like so: >> >> <%= select(''company'', ''country'', [[''België'', ''BE''], >> [''Nederland'', ''NL'']]) %> >> >> But the ë in België is displayed as ? in Firefox and as || in IE5. > > Make sure your editor saves the file in UTF-8 charset.-- Posted via http://www.ruby-forum.com/.
Nick Snels escribió:> Hi, > > I''m trying to at a select box to my page like so: > > <%= select(''company'', ''country'', [[''België'', ''BE''], > [''Nederland'', ''NL'']]) %> > > But the ë in België is displayed as ? in Firefox and as || in IE5. > > I have already placed some html code at the top of the page: > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <title><%= @title %></title> > <meta http-equiv="content-type" content="text/html; charset=utf-8"> > > But that doesn''t solve the problem. Anybody managed to solve it? All > help is welcome. Thanks. > > Kind regards, > > Nick >see this: http://www.cookwood.com/html/extras/entities.html bye
hey, read this http://article.gmane.org/gmane.comp.lang.ruby.rails/33858 this is how i solved my problem cuz i also export to pdf and excel if i used utf8: -the website OK -export pdfs and excels NOT OK if i used iso-8859-1: -the website NOT OK -export pdfs and excels OK so i set the charset for each def in all my controllers, this worked for me. Nick.
I''m not a RoR guru, but a fact is when using: <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-15"/> (so charset "ISO-8859-15") in your HTML files there''s no problem displaying chars like that, in my case pulled straight from a mysql db. (done with a perl script). I imagine this works as well for rails but you have to figure out what (read: where) to tell Rails. Regards, Gerard. On Monday 12 December 2005 11:26, Brutyn Nick tried to type something like:> hey, > > read this http://article.gmane.org/gmane.comp.lang.ruby.rails/33858 > this is how i solved my problem > > cuz i also export to pdf and excel > > if i used utf8: > -the website OK > -export pdfs and excels NOT OK > > if i used iso-8859-1: > -the website NOT OK > -export pdfs and excels OK > > so i set the charset for each def in all my controllers, this worked for > me. > > Nick. > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- $biz = http://www.gp-net.nl ; $fun = http://www.mrmental.com ; ~ ~ :wq!