fix #19723 SVG: transform attribute is not handled collectly (#19845)

* * Move pyopen with encoding to utils.
 and modify all importing library to use pyopen with encoding.
with this change, DXF OCA AirfoilDAT with multibyte sequence always read as utf-8.

* Fix SVG transform attribute is not handler collectly.
This commit is contained in:
Mino-Tsuzuku
2025-03-02 10:06:46 +09:00
committed by GitHub
parent 18ea2bf9d5
commit 9aef91b3ca

View File

@@ -1616,7 +1616,7 @@ class svgHandler(xml.sax.ContentHandler):
_transf = _op + '\\s*?' + _val
transformre = re.compile(_transf, re.DOTALL)
m = FreeCAD.Matrix()
for transformation, arguments in transformre.findall(tr):
for transformation, arguments in reversed(transformre.findall(tr)):
_args_rep = arguments.replace(',', ' ').split()
argsplit = [float(arg) for arg in _args_rep]
# m.multiply(FreeCAD.Matrix(1, 0, 0, 0, 0, -1))