NucuCar.Domain: Telemetry change publisher encoding to UTF8

This commit is contained in:
Denis-Cosmin Nutiu 2020-02-01 16:50:40 +02:00
parent 943aafdf40
commit ec60ba588b
2 changed files with 2 additions and 2 deletions

View file

@ -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);
}

View file

@ -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
{