Fix mojibake in DX cluster and RBN spot comments where the source uses UTF-8

This commit is contained in:
Ian Renton
2026-09-20 19:11:53 +01:00
parent 9272766ffb
commit 6037e742cc
11 changed files with 29 additions and 17 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import telnetlib3
from core.config import SERVER_OWNER_CALLSIGN
from data.spot import Spot
from providers.spot.spot_provider import SpotProvider
from core.utils import decode_telnet_bytes
logger = logging.getLogger(__name__)
@@ -96,7 +97,7 @@ class DXCluster(SpotProvider):
try:
# Check new telnet info against regular expression
telnet_output = self._telnet.read_until("\n".encode("latin-1"))
match = self._spot_line_pattern.match(telnet_output.decode("latin-1"))
match = self._spot_line_pattern.match(decode_telnet_bytes(telnet_output))
if match:
spot_time = datetime.strptime(match.group(5), "%H%MZ").replace(tzinfo=pytz.UTC)
spot_datetime = datetime.combine(