From e555334505753b495993e1fce9e98a22ca66a6b1 Mon Sep 17 00:00:00 2001 From: loredo Date: Sun, 27 Nov 2016 13:18:23 +0000 Subject: [PATCH] 59_Wunderground: narrow no-break space for symbols git-svn-id: https://svn.fhem.de/fhem/trunk@12674 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/59_Wunderground.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/59_Wunderground.pm b/fhem/FHEM/59_Wunderground.pm index 8419eb21e..82394f6f0 100644 --- a/fhem/FHEM/59_Wunderground.pm +++ b/fhem/FHEM/59_Wunderground.pm @@ -704,11 +704,17 @@ sub Wunderground_Hash2Readings($$;$) { $reading = "fc" . $period . "_"; my $symbol_c = Encode::encode_utf8( chr(0x202F) . chr(0x00B0) . 'C' ); my $symbol_f = Encode::encode_utf8( chr(0x202F) . chr(0x00B0) . 'F' ); - my $symbol_pct = Encode::encode_utf8( chr(0x00A0) . '%' ); + my $symbol_pct = Encode::encode_utf8( chr(0x202F) . '%' ); + my $symbol_kmh = Encode::encode_utf8( chr(0x00A0) . 'km/h' ); + my $symbol_mph = Encode::encode_utf8( chr(0x00A0) . 'mph' ); $h->{fcttext_metric} =~ s/(\d)C/$1$symbol_c/g; $h->{fcttext} =~ s/(\d)F/$1$symbol_f/g; $h->{fcttext_metric} =~ s/(\d)\s*%/$1$symbol_pct/g; $h->{fcttext} =~ s/(\d)\s*%/$1$symbol_pct/g; + $h->{fcttext_metric} =~ s/(\d)\s*km\/h/$1$symbol_kmh/g; + $h->{fcttext} =~ s/(\d)\s*km\/h/$1$symbol_kmh/g; + $h->{fcttext_metric} =~ s/(\d)\s*mph/$1$symbol_mph/g; + $h->{fcttext} =~ s/(\d)\s*mph/$1$symbol_mph/g; readingsBulkUpdate( $hash, $reading . "icon$night", $h->{icon} );