xaml export inconsistently translates unitless lengths ("e.g. "," as decimal separator) when in german locale
Migrated from: https://bugs.launchpad.net/inkscape/+bug/1789410 to inbox#2208 (closed) and then moved here
Steps to reproduce:
- Open Inkscape in a German locale (
export LC_NUMERIC=de_DE.UTF-8
) - Open Bug1789410.svg
- Open Save As dialog
- Export as xaml
What happened?
- The StrokeThickness has a comma decimal separator when stroke-width is
6.28023789pt
but decimal separator when stroke-width is just6.28023789
What should have happened?
Consistently writes decimal separator (preferably .
rather than in specific locale)
Inkscape version
- 1.1-dev (530a203f00, 2020-04-07) debug build Linux Mint 19.1
- 0.92.0 r15299 Windows 10
Thomas W. (thomasw-mitutoyo-ctl) wrote that:
<xsl:decimal-format> element
is required for format-number() function to work correctly.
MSDN decimal-format: https://msdn.microsoft.com/en-US/library/ms256229(v=vs.120).aspx
MSDN format-number(): https://msdn.microsoft.com/en-us/library/ms256225(v=vs.110).aspx
Below was an unsuccessful workaround (produced StrokeThickness="NaN"
)
<xsl:attribute name="StrokeThickness">
<xsl:value-of select="format-number($stroke_width, '#.#')" />
</xsl:attribute>
A generic issue was fixed earlier by using format-number($cy - @ry, "#.#")
, in https://bugs.launchpad.net/inkscape/+bug/380199 but the problem still exists in this case.
Edited by Nathan Lee