Search code examples
xmlsvgfontsadobe-illustrator

SVG special characters in Adobe Illustrator


I've created the following svg file:

<?xml version="1.0" encoding="utf-8"?>
<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg">
 <g>
  <title>Layer 1</title>
  <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" id="svg_1" y="138" x="79" stroke-width="0" stroke="#000000" fill="#000000">Sø</text>
 </g>
</svg>

But when I try to open it in Adobe Illustrator I get an error saying it's an invalid SVG file.

This is due to the "ø".

I've been scratching my head, but I can't come up with a solution


Solution

  • You could either use an encoding which supports this character e.g.

    <?xml version="1.0" encoding="Windows-1252"?>
    

    or alternatively encode the character. Judging from this you'd replace the problem letter with &#248;