WindowsCommunityToolkit
WindowsCommunityToolkit copied to clipboard
Win2D Path Mini Parser: decimal separator localization bug
Describe the bug
When the user uses the English (United States) locale but change their decimal separator to use anything other than a dot, Win2D Path Mini Parser generates the wrong code.
Regression
No response
Reproducible in sample app?
- [X] This bug can be reproduced in the sample app.
Steps to reproduce
1. Change the decimal separator in the Control Panel Region Applet
2. Open the Sample App.
3. Go to Helpers > Win2D Path Mini Language Parser
4. Click on any of the samples (i.e., Rounded Star)
5. Observe the Canvas tab showing nothing, and the wrong code being generated in the Commands tab.
Expected behavior
The Canvas tab should show the correct glyphs and the Commands tab should show the correct code being generated, regardless of the user's decimal settings.
Screenshots
Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 11 21H2 (Build 22000)
- [X] Other (specify)
Other Windows Build number
23481 and 23486
App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [X] Other (specify)
Other SDK version
10.0.22621.0
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
Desktop
Nuget packages
Microsoft.Toolkit.Uwp.UI.Media 7.1.3
Additional context
Wrong path for Rounded Star in English United States + comma as decimal separator: https://gist.github.com/dongle-the-gadget/16d4112792a56a175008d48e058dbd53
Correct reference path from default locale settings: https://pastebin.com/raw/fwMPkfKp
From my observation, it seems that the decimal point was entirely missing.
[Unrelated to the problem but worthy to mention: the suffix "f" for float is also missing]
Help us help you
Yes, I'd like to be assigned to work on this item.