Culture Issue with SVG


I'm french and i'm try to use the svg feature.

When i look the generated svg code i noticed that decimals are not well formated. In cause the decimal separator in French is ",".

So you have to specify the culture when you generating SVG code.


Silverlancer wrote May 23, 2013 at 7:05 AM

SVG is display correctly but message you put in contain separator?

Could you give some more detailed example.

iMarti wrote May 27, 2013 at 4:51 PM

I submitted a correction in the SVG StringBuilderExtension class. The string.Format calls use the current thread's culture, which may format floating point values with commas instead of dots.
Each call now explicitly specifies CultureInfo.InvariantCulture.NumberFormat.

Silverlancer wrote May 28, 2013 at 6:30 AM

Cool, thanks iVan.

novergaard wrote Sep 15, 2015 at 9:02 AM

Would it be possible to get this fix merged and published to NuGet?

I'm experiencing the same problem with Danish culture settings where the decimal seperator is "," and not "." which makes the SVG inrenderable. I used a couple of hours debugging my code, until our designer pointed out that the SVG was incorrect :)