Haml / rails: title of a lesson with German umlauts

I would like to do something similar in my application layout:

%title= "#{yield(:sub_title)} - Page Name" 

and in real form

- content_for :sub_title do
  รœbersicht # I tried Übersicht, != "Übersicht" and a bunch of other methods

what happens, I either get a black pound with a question mark in it โ†’ incorrect coding, or an unprocessed string (& UumI; bersicht).

Does anyone know how to make this work? Another requirement is that I would like to show custom content in the header, and this content may or may not have umlouts in it.

Used versions: Haml 3.0.11, Rails 3 beta4 and currently for development of JRuby 1.5

+3
source share
1 answer

, ? Ü .

content_type 'text/html', :charset => 'utf-8'
+2

Source: https://habr.com/ru/post/1749714/


All Articles