Export to SVG adding spurious characters to gtags from layer names which start with numbers
When exporting to svg if the layer name in Illustrator starts with a number when it comes out the other end as a gtag in the svg it is adding spurious characters. For example if a layer name starts with 0Yx it is coming out in the svg as _30Yx This then means that downstream where the application is expecting 0Yx it's not working as _30Yx is there instead. This has only started recently with the new version of Illustrator and the only work round is to close Illustrator 2024 and export using Illustrator 2023

-
I understand it perfectly, yes.
I immediately forwarded this to the one who can review this, and hopefully they will make it possible to control. -
Richard commented
Hello Egor, we can live with both spaces and underscores on Illustrator being changed to underscores in the svg, which is what the other report is about. However this report is a new find that we cannot live with, i.e. ids which start with numbers having additional characters inserted into the ids in the svg which then causes downstream processes which depend on the original ids which we input to fail. Accordingly we have now had to revert to a previous version of Illustrator & prevent updates as these updates clearly aren't tested properly and have unforeseen bug issues. This caused me a lot of angst and staying up most of last night re-editing every svg file that I had exported from AI since the new version came down in readiness for an important down-stream release this-morning.
-
To _x5F_ actually.
Here is a report about this: https://illustrator.uservoice.com/forums/601447/suggestions/48696056
The comments inside explain why it happens and why it behaved differently before.
Please read through. -
Richard commented
Using the Save As method. Something has definitely gone awry with the new version of AI. Another annoying thing it is doing is changing underscores to something like _x36_ and changing spaces to underscores, so we now have to change all underscrores to spaces in our AI file to actually get underscores in the svg
-
Richard, do you use Save As or Export As method (or maybe even Export Assets) for this?