I have this simple code:
QueueClient azQueue = new QueueClient(@"<connection string>", "test-queue");
azQueue.SendMessage("test®test");
and it fails with message: "Retry failed after 6 tries." If I remove ® character from string it sends message with no issue. Please help me handle special characters properly.
I believe you are using newer SDK Azure.Storage.Queues
which does not automatically encode the message in Base64 like the previous ones Microsoft.Azure.Storage.Queue
or WindowsAzure.Storage
(deprecated). So it's better to encode your message like below. Also refer this: https://github.com/Azure/azure-sdk-for-net/issues/11358 and there is also a feature request https://github.com/Azure/azure-sdk-for-net/issues/10242.
QueueClient azQueue = new QueueClient(@"<connection string>", "test-queue");
azQueue.SendMessage(Convert.ToBase64String(Encoding.UTF8.GetBytes("test®test")));