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
Fix ToSvgString #525
Fix ToSvgString #525
Conversation
- prevents crash, fixes svg-net#518 - added test
@@ -14,7 +14,7 @@ public static class PointFExtensions | |||
{ | |||
public static string ToSvgString(this PointF p) | |||
{ | |||
return p.X.ToString() + " " + p.Y.ToString(); | |||
return p.X.ToString(CultureInfo.InvariantCulture) + " " + p.Y.ToString(CultureInfo.InvariantCulture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - not the first time I see such an error!
I don't know which of way is good, but I think that it is better to unify either. |
Some example: |
Seems like |
I would prefer to always use the explicit invariant culture for |
What does this implement/fix? Explain your changes.
The
ToSvgString
method used current culture which produces invalid path data on some culture (uses,
instead of.
for separator.