mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
fhem.pl: better umlaut conversion in makeReadingName
git-svn-id: https://svn.fhem.de/fhem/trunk@22990 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a8719cebc9
commit
700349169f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user