Hi, Getting error messages when using the german letters ä,ö,ü,.., e.g. def show @title = "Über uns" <-- I had to modify to "Ueber uns" end does anyone know how to overcome this issue ? thank you. Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
What error messages are you getting and where ? which version of Ruby and Rails are you running ? def show is in a controller, I assume ? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Are you using ruby 1.9.2 with Mysql (via mysql gem)? On Wed, Oct 20, 2010 at 6:28 AM, KlausG <KD.Gundermann-BZlAiGM7svcjFa9OqdExcIQuADTiUCJX@public.gmane.org>wrote:> What error messages are you getting and where ? > which version of Ruby and Rails are you running ? > def show is in a controller, I assume ? > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Here is what I''m getting: C:/Rails/hopp/app/controllers/pages_controller.rb:16: invalid multibyte char (US-ASCII) C:/Rails/hopp/app/controllers/pages_controller.rb:16: syntax error, unexpected tIDENTIFIER, expecting keyword_end @title = "�ber" ^ C:/Rails/hopp/app/controllers/pages_controller.rb:16: unterminated string meets end of file C:/Rails/hopp/app/controllers/pages_controller.rb:16: syntax error, unexpected $end, expecting keyword_end I''m using Rails 3.0, Ruby 1.9.2, sqlite3. Thanks. Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
any help here ? thank you. Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Add the magic comment: # encoding: UTF-8 to the top of your source file -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Klaus-dieter Gundermann wrote in post #956115:> Add the magic comment: > > # encoding: UTF-8 > > to the top of your source fileThank you. What do you mean by "top of your source file" ? The error says that the source is The source of your template was: C:/Rails/app/views/pages/wir.html.erb, which has the following text: # encoding: UTF-8 <h1>Wir</h1> <p> <%= image_tag("raum.jpg", :alt => "Studio Logo", :class => "round") %> <%= image_tag("willkommen.png", :alt => "Studio Logo", :class => "round") %> <% balance hei�t der neue Raum f�r ... %> So I did put ''# encoding: UTF-8'' at the top of that file (as you can see above. Still same issue. Any idea ? Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, Oct 21, 2010 at 4:23 PM, Dani Dani <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Klaus-dieter Gundermann wrote in post #956115: > > Add the magic comment: > > > > # encoding: UTF-8 > > > > to the top of your source file > > Thank you. > > What do you mean by "top of your source file" ? > > The error says that the source is > > The source of your template was: > C:/Rails/app/views/pages/wir.html.erb, which has the following text: > > # encoding: UTF-8 > <h1>Wir</h1> > <p> > <%= image_tag("raum.jpg", :alt => "Studio Logo", > :class => "round") %> > <%= image_tag("willkommen.png", :alt => "Studio Logo", > :class => "round") %> > <% balance hei�t der neue Raum f�r ... %> > > So I did put ''# encoding: UTF-8'' at the top of that file (as you can see > above. Still same issue. > > Any idea ? > > Dani >no the error is here def show> @title = "Über uns" <-- I had to modify to "Ueber uns" > end >in the controller put the comment on the first line of the controller, it should be the pages controller -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Radhames Brito wrote in post #956354:> in the controller > > put the comment on the first line of the controller, it should be the > pages > controllerThank you. Yes, the text you mention is from the original part mentioned above, but in the meantime I have changed the text from "Über uns" to Ueber uns". So that now I have the problem in the above text mentioned text. Of course I can change the text form e.g. ü->ue, ä->ae,... (which I have done so I can go on developing. I did put the --> # encoding: UTF-8 in the controller, but same thing. Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Oct 23, 12:49 am, Dani Dani <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Yes, the text you mention is from the original part mentioned above, but > in the meantime I have changed the text from "Über uns" to Ueber uns". > So that now I have the problem in the above text mentioned text. Of > course I can change the text form e.g. ü->ue, ä->ae,... (which I have > done so I can go on developing. > I did put the --> # encoding: UTF-8 in the controller, but same thing. > DaniDoes your text editor support UTF-8? Are you saving the file as UTF-8? I guess the file encoding and comment specified in the "magic comment" must match. jEdit is a text editor I know of with very good encoding support. Will -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
William Denniss wrote in post #956507:> > Does your text editor support UTF-8? Are you saving the file as > UTF-8? I guess the file encoding and comment specified in the "magic > comment" must match. > > jEdit is a text editor I know of with very good encoding support. > > WillThank you for your response. I don''t understand exactly what you mean by ''editor support UTF-8?'', I can type those characters ä,ü,..., and how is it related to the problem I have with the program ?. Would appreciate any help. Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you.> > Yes, the text you mention is from the original part mentioned above, but > in the meantime I have changed the text from "Über uns" to Ueber uns". > So that now I have the problem in the above text mentioned text. Of > course I can change the text form e.g. ü->ue, ä->ae,... (which I have > done so I can go on developing. > I did put the --> # encoding: UTF-8 in the controller, but same thing.>then the error message is misleading and the error is something else, try to check if there is something wrong with code above this line that may be making rails think that is the error -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dani Dani wrote in post #956895:> William Denniss wrote in post #956507: >> >> Does your text editor support UTF-8? Are you saving the file as >> UTF-8? I guess the file encoding and comment specified in the "magic >> comment" must match. >> >> jEdit is a text editor I know of with very good encoding support. >> >> Will > > Thank you for your response. > I don''t understand exactly what you mean by ''editor support UTF-8?'', I > can > type those characters ä,ü,...,Yes, but what encoding are you saving the file in? You should be saving the file with the UTF-8 encoding. Your editor should provide a feature to set the encoding. If it does not, get a different editor.> and how is it related to the problem I > have with the program ?.Simple: if the encoding is different from what Rails expects, then the characters will come out incorrectly. An encoding is simply a mapping that says "when you see 0x0041, that represents ''A''." Files are just stored as byte sequences, so both the reader and writer have to know what the encoding is in order to make sense out of the file. If this is hard to understand, you need to review some basic information about text encodings.> Would appreciate any help. > > DaniBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, Great, thank you all especialy Will & Marnen, you are right, my editor was not set to utf-8 encoding. Now it is working !. Thanks for not giving up. Have a nice week, Dani -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.