I am developing an application in German. This means I have umlauts. When I was using rails version 0.13.1 there seemed to be no further configuration needed for umlauts to be shown correctly. Now I have upgraded to 0.14.2 and the umlauts are being displayed at ''?''s. I changed the encoding of the page and it is UTF-8. I have also tried the steps listed at http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings, but that did not help. Has anyone else seen this problem? Do you have a definitive way to fix it? Thanks, Jacob _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> I am developing an application in German. This means I have umlauts. When I > was using rails version 0.13.1 there seemed to be no further configuration > needed for umlauts to be shown correctly. Now I have upgraded to 0.14.2 and > the umlauts are being displayed at ''?''s. I changed the encoding of the page > and it is UTF-8. I have also tried the steps listed at > http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings, but that did > not help. > > Has anyone else seen this problem?No, I also develop a german webapp and have no problems. Make sure to save the views as UTF8 and edit them with an editor that is capable of UTF8. In the layout I have <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> And in ApplicationController before_filter :send_utf_headers def send_utf_headers @headers["Content-Type"] = "text/html; charset=utf-8" end This way it also works in Safari. Regards, Jonathan -- Jonathan Weiss http://blog.innerewut.de
On 2.11.2005, at 17.32, Jonathan Weiss wrote:>> I am developing an application in German. This means I have >> umlauts. When I >> was using rails version 0.13.1 there seemed to be no further >> configuration >> needed for umlauts to be shown correctly. Now I have upgraded to >> 0.14.2 and >> the umlauts are being displayed at ''?''s. I changed the encoding of >> the page >> and it is UTF-8. I have also tried the steps listed at >> http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings, >> but that did >> not help. >> >> Has anyone else seen this problem? > > No, I also develop a german webapp and have no problems.No problems here either, neither before nor after the upgrade. //jarkko -- Jarkko Laine http://jlaine.net http://odesign.fi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Thanks, What I needed was to save my rhtml pages at UTF-8, they were ANSI. It is interesting that this was not a problem before though. Converting the files fixed the statc text, but now it appears that all of my old data is in ANSI. When I enter new data with umlauts it is fine, but the existing records are still not correct. Any tips on how to convert MySql data from one encoding to another? Thanks again, Jacob On 11/2/05, Jonathan Weiss <jw-eM0Q5iXcOashFhg+JK9F0w@public.gmane.org> wrote:> > > I am developing an application in German. This means I have umlauts. > When I > > was using rails version 0.13.1 there seemed to be no further > configuration > > needed for umlauts to be shown correctly. Now I have upgraded to 0.14.2and > > the umlauts are being displayed at ''?''s. I changed the encoding of the > page > > and it is UTF-8. I have also tried the steps listed at > > http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings, but that > did > > not help. > > > > Has anyone else seen this problem? > > No, I also develop a german webapp and have no problems. > > Make sure to save the views as UTF8 and edit them with an editor that is > capable of UTF8. > > In the layout I have > > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> > > And in ApplicationController > > before_filter :send_utf_headers > def send_utf_headers > @headers["Content-Type"] = "text/html; charset=utf-8" > end > > This way it also works in Safari. > > Regards, > Jonathan > > -- > Jonathan Weiss > http://blog.innerewut.de > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> Thanks, > > What I needed was to save my rhtml pages at UTF-8, they were ANSI. It is > interesting that this was not a problem before though. Converting the files > fixed the statc text, but now it appears that all of my old data is in ANSI. > When I enter new data with umlauts it is fine, but the existing records are > still not correct. > > Any tips on how to convert MySql data from one encoding to another? >Make a mysql dump, use ''recode'' to transform the dump data and load the dump again. Make sure to create the database with something like DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.> Thanks again, > JacobRegards, Jonathan -- Jonathan Weiss http://blog.innerewut.de