Hi there
We recently experienced a bug in the XamRichTextEditor in version 16.2.20162.1006 (which our app is running productively on) and i also verified the same behavior in version 17.1.20171.1000 (the latest i have).
The problem is, that the XamRichtTextEditor (or maybe HtmlDocumentAdapter) uses region settings for parsing numeric values. So when the machine uses a "." (dot) in the regional settings for decimal seperator everything is fine. But if the machine is configured for Germany (de-de) as example, the decimal seperator is set to "," (comma). And then the XamRichTextEditor uses the "," for parsing numeric values in the HTML code. For the XamRichTextEditor, it does not make any difference when displaying the rich text. But for other controls we use, the visual representation for the HTML code is completly off, because the sizes of text, lines and so on is not rendered correctly.
And i also checked the CSS numeric syntax, and there is defined that a numeric value has to have a "." (dot) as decimal seperator.
https://www.w3.org/TR/css3-values/#numbers
"or more decimal digits followed by a dot (.) followed by one or more decimal digits and"
Please see attached screenshots.
Can you please check this as soon as possible and give us a fix or a workaround?Kind regards
Chris
4
Hello,
I was able to reproduce the issue and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 241748. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
Meanwhile as a workaround I can suggest you to change the NumberDecimalSeparator of the CurrentThread to "." in your project like this:
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("de-de"); cultureInfo.NumberFormat.NumberDecimalSeparator = "."; Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo;
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("de-de"); cultureInfo.NumberFormat.NumberDecimalSeparator = ".";
Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo;
This should start generating valid html.
Please let me know if you need more information.
Sincerely,Teodor TenevSoftware Developer
Hi Teodor
Thank you for your reply and creating the Development ID. And also your suggested workaround.
But i can't just change it in the current thread, because this would change it for the whole application (the german user want to see the numbers sperated with a "," (comma)). And it's to risky too change on a such a low level. This can cause a lot of other problems..
Can you give me an ETA on the fix?
Regards
Hi Christian,
Unfortunately I can not give you an estimated time when we are going to fix this. What you can try is to change the thread's decimal separator only during the html parsing and after that return back to the original culture. I have attached a sample which demonstrates how to do this.
I believe this won't affect anything else in your project except the generated html.
If you require any further assistance on the matter, please let me know.
The fix for development issue 241748 is available in the latest service release for 17.1 and 17.2. This can be downloaded from the My Keys and Downloads page.
Let us know if you have any further questions.
Hi Chris,
The bug is not fixed yet. We will investigate it in a further sprint. Unfortunately I can't give you a specific date when this will happen, but you will be notified via the email when the bug is fixed.
Isn't the workaround working for you for now?
Any updates on this?
Yes, you will received an email when the bug is fixed.
Thanks for your sample. I will have a look, how i can implement this in our application.
Will i get notified somehow, when this problem is fixed?