-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built-in JsonNamingPolicy
types don't recognize surrogate pairs
#90352
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsConsider the following example: string value = "𐐀𐐨𐐨𐐀𐐨𐐨"; // surrogate pairs with mixed capitalization
Console.WriteLine(JsonNamingPolicy.CamelCase.ConvertName(value)); // 𐐀𐐨𐐨𐐀𐐨𐐨 should be 𐐨𐐨𐐨𐐀𐐨𐐨
Console.WriteLine(JsonNamingPolicy.SnakeCaseLower.ConvertName(value)); // 𐐀𐐨𐐨𐐀𐐨𐐨 should be 𐐨𐐨𐐨_𐐨𐐨𐐨 Neither See eiriktsarpalis@c1c5d1c for a prototype implementation that polyfills
|
Consider the following example:
Neither
JsonNamingPolicy.CamelCase
norJsonNamingPolicy.SnakeCase/KebabCase
have support for surrogate pairs. We should consider adding support for surrogate pairs in the future (although that would most likely require #52947).See eiriktsarpalis@c1c5d1c for a prototype implementation that polyfills
Rune
.Related to #90316
The text was updated successfully, but these errors were encountered: