Forum: Rails Germany Probleme mit Umlaute in text.

Posted by Dani Dani (laguna53)
on 2010-10-19 11:02
Hallo,
ich habe probleme Texte mit Umlaute zu benutzen. Die Applikation läuft
nicht, z.B. wenn ich in der controller sowas einfaches sogar tue:
def show
 @title = "über uns"
end

jede Hilffe ist willkommen. Danke.

Dani
Posted by Bob G. (bob_g)
on 2011-01-17 08:50
Legen Sie die Zeile

# Coding: UTF-8

am *TOP* der Quelldatei als:

# coding: UTF-8
def show
 @title = "über uns"
end

Der normale Standard (Ruby 1.9.2) ist US-ASCII, die nicht wie Umlaute.

Viel Glück
Posted by Fritz Salzmann (the_fritz)
on 2012-04-07 21:27
Mit # encoding: utf-8 ganz oben klappt es bei mir. Beim Herumprobieren 
in Windows 7 habe ich gemerkt, dass die Kommandozeile anscheinend utf-8 
nicht korrekt darstellt.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.