[Solved] Ticket #4170 - Incompatibility of spanish translation and exporting to SVG
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Solved] Ticket #4170 - Incompatibility of spanish translation and exporting to SVG
There is a problem of incompatibility when trying to export to a SVG file, using the Spanish translation of the program.
There are some Spanish characters (á, ó), which are generated in lines 3 and 4 of the SVG file, resulting in a void virtualisation of the SVG file when opening it in Chrome or Internet Explorer. Those files can be opened by Inkscape, or they are properly generated when using the English interface of FreeCAD. It is solved too, when editing the SVG file by using the Notepad.
But the best solution would be to avoid these "problematic" characters when generating the SVG using the Spanish File. How could it be changed?
Thank you very much!!!
There are some Spanish characters (á, ó), which are generated in lines 3 and 4 of the SVG file, resulting in a void virtualisation of the SVG file when opening it in Chrome or Internet Explorer. Those files can be opened by Inkscape, or they are properly generated when using the English interface of FreeCAD. It is solved too, when editing the SVG file by using the Notepad.
But the best solution would be to avoid these "problematic" characters when generating the SVG using the Spanish File. How could it be changed?
Thank you very much!!!
Last edited by Kunda1 on Tue Jan 14, 2020 2:22 pm, edited 1 time in total.
Reason: Marked this thread as [Solved]
Reason: Marked this thread as [Solved]
Re: Incompatibility of spanish translation and exporting to SVG
Hi and welcome to the forum!
Have you tried the latest 0.19? Please attach your full FreeCAD info as described in the IMPORTANT forum rules linked above.
Have you tried the latest 0.19? Please attach your full FreeCAD info as described in the IMPORTANT forum rules linked above.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- wandererfan
- Veteran
- Posts: 6320
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Incompatibility of spanish translation and exporting to SVG
Lines like this?
Code: Select all
<title>FreeCAD SVG Export</title>
<desc>Drawing page: Page exported from FreeCAD document: _5mmCube</desc>
Re: Incompatibility of spanish translation and exporting to SVG
Thank you very much for your answers!
I'm using the current stable version: 0.18.16131
Previously I've used a 0.16 version without any problem when exporting SVG files using the Spanish translation.
The problem is in the following lines, which are automatically generated:
It has to be noticed that I used this software with my 14-year-old students, and I need something stable to be easily used by them at their homes when they download FreeCAD. (if it would be only used by me, there wouldn't be any problem, because I'd edit the svg file, but...)
Thank you!
I'm using the current stable version: 0.18.16131
Previously I've used a 0.16 version without any problem when exporting SVG files using the Spanish translation.
The problem is in the following lines, which are automatically generated:
Code: Select all
<title>Exportación de SVG de FreeCAD</title>
<desc>Página de dibujo: Page exportado desde documento de FreeCAD: __13__Pieza_1_para_acotar</desc>
Thank you!
- wandererfan
- Veteran
- Posts: 6320
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Incompatibility of spanish translation and exporting to SVG
I am having difficulty duplicating your results using:
OS: Linux Mint 19
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.3.
Build type: Release
Python version: 2.7.15+
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
What do you see when you try to display the svg file in IE/Chrome?
- Attachments
-
- Spanishv018.3_Firefox.png (121.84 KiB) Viewed 2366 times
-
- Spanishv018.3_Chromium.png (71.23 KiB) Viewed 2366 times
-
- Englishv018.3_Firefox.png (120.5 KiB) Viewed 2366 times
-
- Englishv018.3_Chromium.png (66.86 KiB) Viewed 2366 times
Re: Incompatibility of spanish translation and exporting to SVG
I am having a similar problem with German Umlauts in a drawing title of a SVG-file.
I am getting the following errormessage in Firefox at opening of such a SVG-file:
Which means: XML-computation error: not well formed.
I had to delete the garbage in the error message after DRAWING TITLE, as I got otherwise an error in the Preview of this post.
I added
The files are attached.
My FreeCAD version is:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18524 (Git)
Build type: Release
Branch: master
Hash: bea009c1d52b97655dab2d5c0fbddec30989a902
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Ulrich
I am getting the following errormessage in Firefox at opening of such a SVG-file:
Code: Select all
XML-Verarbeitungsfehler: nicht wohlgeformt
Adresse: file:///F:/FreeCAD/Debugging/TechDraw19ISOA4Umlauts.svg
Zeile Nr. 71, Spalte 47: <tspan xml:space="preserve">DRAWING TITLE
----------------------------------------------^
I had to delete the garbage in the error message after DRAWING TITLE, as I got otherwise an error in the Preview of this post.
I added
in FreeCAD to the DRAWING TITLE.ÄÖÜß
The files are attached.
My FreeCAD version is:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18524 (Git)
Build type: Release
Branch: master
Hash: bea009c1d52b97655dab2d5c0fbddec30989a902
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Ulrich
- Attachments
-
- TechDraw19ISOA4Umlauts.FCStd
- (4.08 KiB) Downloaded 50 times
-
- TechDraw19ISOA4Umlauts.zip
- (1.96 KiB) Downloaded 51 times
- wandererfan
- Veteran
- Posts: 6320
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Incompatibility of spanish translation and exporting to SVG
Try changing the first line of the template to this:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
Thanks,
wf
Re: Incompatibility of spanish translation and exporting to SVG
I changed the line directly in the SVG-file. Firefox opens the drawing then without error message.wandererfan wrote: ↑Fri Oct 18, 2019 12:35 am Try changing the first line of the template to this:
Code: Alles auswählen
and let me know how what happens.Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
Ulrich
- wandererfan
- Veteran
- Posts: 6320
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Incompatibility of spanish translation and exporting to SVG
Same result here.
So the template files are really encoded "Latin-1" but marked "Utf-8", or the code is inserting "Latin-1" text into a "Utf-8" document.
Thanks.
Re: Incompatibility of spanish translation and exporting to SVG
As the templates contain only English text, there should be no difference between "Latin-1" and "Utf-8". So I do suspect the latter, that "Latin-1" is inserted in the "Utf-8" document.wandererfan wrote: ↑Fri Oct 18, 2019 2:09 pm So the template files are really encoded "Latin-1" but marked "Utf-8", or the code is inserting "Latin-1" text into a "Utf-8" document.
I deleted the four characters "ÄÖÜß" with an editor and the file was four bytes smaller. So this are one byte characters meaning "Latin-1" coded.
Ulrich