Unicode characters should be escape when serializing messages.
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Start at src/DurableTask.Core/Serializing/JsonDataConverter.cs around line 38 and inspect the JsonSerializerSettings used by the constructor. Confirm how Unicode message values are serialized and how the result is stored in the Microsoft.DurableTask.SqlServer Payloads varchar(max) field. Done means non-ASCII characters are escaped during serialization so they are not corrupted in the database.
Written by the indexing model from the issue text.
Description
Add StringEscapeHandling = StringEscapeHandling.EscapeNonAscii into JsonSerializerSettings.
public JsonDataConverter()
: this(new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.Objects,
DateParseHandling = DateParseHandling.None,
StringEscapeHandling = StringEscapeHandling.EscapeNonAscii,
#if NETSTANDARD2_0
SerializationBinder = new PackageUpgradeSerializationBinder()
#else
Binder = new PackageUpgradeSerializationBinder()
#endif
})
{ }
When using the Microsoft.DurableTask.SqlServer package, the Payloads field's datatype is varchar(max).
When the database defaults to English, so varchar will not be saved correctly when inserting Unicode characters.
Example:
SELECT [Text],[Reason] FROM [dt].[Payloads]
[{"$type":"xxx","Name":"????2024?4??????.md","BookId":"6b88bc7a-9c5f-7a83-2003-e935bb5b33a8","BookName":"????2024?4??????.md"}]
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/durabletask
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Azure/durabletask#1398 · 2 comments ·
Maintainers usually reply within 3 days
-
Azure Storage backend: control queue partition left unowned for hours/days after lease expiresMay be free again @nytian claimed this 35 days ago, and no pull request is open. Open
Azure/durabletask#1389 · 1 comment · 1 assignee ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Azure/durabletask#1332 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Azure/durabletask#1318 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Azure/durabletask#1301 · 3 comments ·
Maintainers usually reply within 3 days
All issues in Azure/durabletask
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
MicrosoftLearning/PL-400_Microsoft-Power-Platform-Developer#231 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
joinrpg/joinrpg-net#5313 ·
Maintainers usually reply within 1 day
-
[12.x] FixIncorrectOwnerIdRelationships can delete legitimate library roots when UserView shares the same pathPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day