One of my coworkers just run into a bug that I’ve inserted in a code sequence.

var svgCmd = string.Format( "M {0:0.00},{1:0.00} ", source.X, source.Y );

All good, but the code assumes it is running on a system with en-us culture.
My coworker had his system culture set to ro-ro and the generated SVG was giberrish.

The correct way of printing double values (and probably dates as well):

var svgCmd = string.Format( CultureInfo.InvariantCulture, "M {0:0.00},{1:0.00} ", source.X, source.Y );
Advertisements