From 700349169fbac8dcf97dd61678f0613b9ed5b63c Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 19 Oct 2020 22:18:24 +0000 Subject: [PATCH] fhem.pl: better umlaut conversion in makeReadingName git-svn-id: https://svn.fhem.de/fhem/trunk@22990 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 935768858..9914a7e13 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -5945,6 +5945,11 @@ makeReadingName($) # Convert non-valid characters to _ $name =~ s/\s/_/g; return $name; } + my %umlaut = ( '\xc3\xa4'=>'ae', + '\xc3\xb6'=>'oe', + '\xc3\xbc'=>'ue', + '\xc3\x9f'=>'ss'); + map { $name =~ s/$_/$umlaut{$_}/g } keys %umlaut; $name =~ s/[^a-z0-9._\-\/]/_/gi; return $name; }