Code by Scott שאול בן ישוע
Verified Commit 878fd73d authored by Sha'ul ben Yeshua's avatar Sha'ul ben Yeshua 🎗
Browse files

fixede utf8 encoding

parent 646a6696
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
* *
* Version: * Version:
* 1.0.0 - Initial commit * 1.0.0 - Initial commit
* - Fixed UTF8 encoding
* *
*/ */
...@@ -296,7 +297,8 @@ def PollStation() ...@@ -296,7 +297,8 @@ def PollStation()
if (dewpointRaw1.contains("F")) { if (dewpointRaw1.contains("F")) {
dewpointRaw1 = dewpointRaw1.replace(fcode, "") dewpointRaw1 = dewpointRaw1.replace(fcode, "")
dewpointRaw1 = dewpointRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
state.Dewpoint = dewpointRaw1 state.Dewpoint = dewpointRaw1
...@@ -452,6 +454,7 @@ def PollStation() ...@@ -452,6 +454,7 @@ def PollStation()
if (insideTemperatureRaw1.contains("F")) { if (insideTemperatureRaw1.contains("F")) {
insideTemperatureRaw1 = insideTemperatureRaw1.replace(fcode, "") insideTemperatureRaw1 = insideTemperatureRaw1.replace(fcode, "")
insideTemperatureRaw1 = insideTemperatureRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
...@@ -571,7 +574,7 @@ def PollStation() ...@@ -571,7 +574,7 @@ def PollStation()
if (temperatureRaw1.contains("F")) { if (temperatureRaw1.contains("F")) {
temperatureRaw1 = temperatureRaw1.replace(fcode, "") temperatureRaw1 = temperatureRaw1.replace(fcode, "")
temperatureRaw1 = temperatureRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
state.Temperature = temperatureRaw1 state.Temperature = temperatureRaw1
...@@ -613,6 +616,7 @@ def PollStation() ...@@ -613,6 +616,7 @@ def PollStation()
if (tempMinRaw1.contains("F")) { if (tempMinRaw1.contains("F")) {
tempMinRaw1 = tempMinRaw1.replace(fcode, "") tempMinRaw1 = tempMinRaw1.replace(fcode, "")
tempMinRaw1 = tempMinRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
...@@ -655,6 +659,7 @@ def PollStation() ...@@ -655,6 +659,7 @@ def PollStation()
if (tempMaxRaw1.contains("F")) { if (tempMaxRaw1.contains("F")) {
tempMaxRaw1 = tempMaxRaw1.replace(fcode, "") tempMaxRaw1 = tempMaxRaw1.replace(fcode, "")
tempMaxRaw1 = tempMaxRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
...@@ -696,6 +701,7 @@ def PollStation() ...@@ -696,6 +701,7 @@ def PollStation()
if (tempMinInRaw1.contains("F")) { if (tempMinInRaw1.contains("F")) {
tempMinInRaw1 = tempMinInRaw1.replace(fcode, "") tempMinInRaw1 = tempMinInRaw1.replace(fcode, "")
tempMinInRaw1 = tempMinInRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
...@@ -738,6 +744,7 @@ def PollStation() ...@@ -738,6 +744,7 @@ def PollStation()
if (tempMaxInRaw1.contains("F")) { if (tempMaxInRaw1.contains("F")) {
tempMaxInRaw1 = tempMaxInRaw1.replace(fcode, "") tempMaxInRaw1 = tempMaxInRaw1.replace(fcode, "")
tempMaxInRaw1 = tempMaxInRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
...@@ -820,7 +827,8 @@ def PollStation() ...@@ -820,7 +827,8 @@ def PollStation()
if (windChillRaw1.contains("F")) { if (windChillRaw1.contains("F")) {
windChillRaw1 = windChillRaw1.replace(fcode, "") windChillRaw1 = windChillRaw1.replace(fcode, "")
windChillRaw1 = windChillRaw1.replace("°F", "")
if(temperatureUnit == "Fahrenheit (°F)"){ if(temperatureUnit == "Fahrenheit (°F)"){
state.TU = '°F' state.TU = '°F'
state.FeelsLike = windChillRaw1 state.FeelsLike = windChillRaw1
...@@ -1407,3 +1415,4 @@ def LOGINFO(txt){ ...@@ -1407,3 +1415,4 @@ def LOGINFO(txt){
log.error("LOGINFO unable to output requested data!") log.error("LOGINFO unable to output requested data!")
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment