Ciao *, I''m working on setting up instiki for rubyonrails.it, and want to add a few custom headers to make it work with italian people. What I understood is that the best way to accomplish such task is to edit app/views/layouts/default.rhtml, so I changed <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> to <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> and <html xmlns="http://www.w3.org/1999/xhtml"> to <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">. The problem is that I''ve also added a custom header (the green one you can see at www.rubyonrails.it), so I have a lot of strange characters instead of "?????" ... I really can''t see a problem with my approach: as far as the page is served as ISO-8859-1 everything should work fine (and in fact www.rubyonrails.it renders ok). I''m using Webrick, so my guess is that it has a default charset that overwrites the one I set, but to be honest I''m quite clueless now :) TIA, ngw -- checking for life_signs in -lKenny... no Oh my god, make (1) killed Kenny ! You, bastards ! nicholas_wieland-at-yahoo-dot-it
Le Mercredi 18 Mai 2005 15:26, Nicholas Wieland a ?crit?:> Ciao *, > I''m working on setting up instiki for rubyonrails.it, and want to > add a few custom headers to make it work with italian people. > What I understood is that the best way to accomplish such task is to > edit app/views/layouts/default.rhtml, so I changed > > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> > > to > > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> > > and > > <html xmlns="http://www.w3.org/1999/xhtml"> > > to > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">. >Hello, What motivates this change ? Is''nt utf8 just fine, even for an italian site ?> The problem is that I''ve also added a custom header (the green one you > can see at www.rubyonrails.it), so I have a lot of strange characters > instead of "?????" ... > > I really can''t see a problem with my approach: as far as the page is > served as ISO-8859-1 everything should work fine (and in fact > www.rubyonrails.it renders ok).Where is the problem exactly then ? Where do you see the strange chars ?> > I''m using Webrick, so my guess is that it has a default charset that > overwrites the one I set, but to be honest I''m quite clueless now :) > > TIA, > ngw
Denis Mertz wrote:>What motivates this change ? Is''nt utf8 just fine, even for an italian site ? > > >Where is the problem exactly then ? Where do you see the strange chars ? > >Nicholas, I have the same questions as Denis :) -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
- Alexey Verkhovsky :> I have the same questions as Denis :)Even if I use UTF-8 the problem remains, so the charset doesn''t count. Does Webrick use a default charset ? If you or Denis could try to add a pair of ????? to the default layout and see if the page renders correctly I''d know if I have to mess with instiki or just my system ... Thank you both, ngw -- checking for life_signs in -lKenny... no Oh my god, make (1) killed Kenny ! You, bastards ! nicholas_wieland-at-yahoo-dot-it
Le Jeudi 19 Mai 2005 11:59, Nicholas Wieland a ?crit?:> - Alexey Verkhovsky : > > I have the same questions as Denis :) > > Even if I use UTF-8 the problem remains, so the charset doesn''t count. > Does Webrick use a default charset ? > If you or Denis could try to add a pair of ????? to the default layout > and see if the page renders correctly I''d know if I have to mess with > instiki or just my system ...Just a guess, Ruby scripts are encoded either in ASCII or UTF-8 or EUC-JP or Shift-JIS, the last two are for Japanese. Instiki uses UTF-8, and you probably dont want to change that. But this means that you need to encode the Instiki source files (including the .rhtml templates) in UTF-8. I will make a test myself later, do not have enough time now. Ciao Denis> > Thank you both, > ngw
Nicholas Wieland wrote:> - Alexey Verkhovsky : > > >>I have the same questions as Denis :) >> >> > >Even if I use UTF-8 the problem remains, so the charset doesn''t count. >Does Webrick use a default charset ? >If you or Denis could try to add a pair of ????? to the default layout >and see if the page renders correctly I''d know if I have to mess with >instiki or just my system ... > >If I put this line into any .rhtml file, it comes out as a ???? Whereas if I put the same line into the page content, it is rendered fine and dandy. Hmm... has to be something in Rails. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)