From ec60ba588b2a80ada2924a58a034013aefc46961 Mon Sep 17 00:00:00 2001 From: Denis-Cosmin Nutiu Date: Sat, 1 Feb 2020 16:50:40 +0200 Subject: [PATCH] NucuCar.Domain: Telemetry change publisher encoding to UTF8 --- NucuCar.Domain/Telemetry/TelemetryPublisherAzure.cs | 2 +- NucuCar.Domain/Telemetry/TelemetryPublisherDisk.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NucuCar.Domain/Telemetry/TelemetryPublisherAzure.cs b/NucuCar.Domain/Telemetry/TelemetryPublisherAzure.cs index 78efcaf..df56bd3 100644 --- a/NucuCar.Domain/Telemetry/TelemetryPublisherAzure.cs +++ b/NucuCar.Domain/Telemetry/TelemetryPublisherAzure.cs @@ -33,7 +33,7 @@ namespace NucuCar.Domain.Telemetry var messageString = JsonConvert.SerializeObject(data); Logger?.LogDebug($"Telemetry message: {messageString}"); - var message = new Message(Encoding.ASCII.GetBytes(messageString)); + var message = new Message(Encoding.UTF8.GetBytes(messageString)); await PublishToCloudAsync(message, cancellationToken); } diff --git a/NucuCar.Domain/Telemetry/TelemetryPublisherDisk.cs b/NucuCar.Domain/Telemetry/TelemetryPublisherDisk.cs index fae15f0..95e9d71 100644 --- a/NucuCar.Domain/Telemetry/TelemetryPublisherDisk.cs +++ b/NucuCar.Domain/Telemetry/TelemetryPublisherDisk.cs @@ -47,7 +47,7 @@ namespace NucuCar.Domain.Telemetry var data = GetTelemetry(); var messageString = JsonConvert.SerializeObject(data); Logger?.LogDebug($"Telemetry message: {messageString}"); - var encodedText = Encoding.Unicode.GetBytes($"{messageString}{_separator}"); + var encodedText = Encoding.UTF8.GetBytes($"{messageString}{_separator}"); try {