You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def fix_umlauts(string)
string.gsub(/[äöüß]/i) do |match|
case match.downcase
when "ä" 'ae'
when "ö" 'oe'
when "ü" 'ue'
when "ß" 'ss'
end
end
end
This should be extended so that characters like é, â, ç etc. are also replaced with their respective non-accented variants. E.g.
def fix_umlauts(string)
string.gsub(/[äöüß]/i) do |match|
case match.downcase
when "ä" 'ae'
when "ö" 'oe'
when "ü" 'ue'
when "ß" 'ss'
end
end
string.parameterize # requires Rails ActiveSupport, however
end
The text was updated successfully, but these errors were encountered:
This is not about pronounciation or meaning, however - the problem is that currently Faker::Internet.domain_name and .email create strings which are not valid, because in email addresses at least, non-ASCII strings are forbidden (and domain names would need to be punycoded).
Hello,
fix_umlauts is currently implemented this way:
This should be extended so that characters like é, â, ç etc. are also replaced with their respective non-accented variants. E.g.
The text was updated successfully, but these errors were encountered: