<div dir="ltr">Torsten,<div><br></div><div>the file you attached is utf-8 encoded but specifies "encoding  iso8859-1" on the first line.</div><div><br></div><div>XTherion does no encoding autodetection and relies on the first line. When it encounters "ö" character, which is represented by two bytes in utf-8 (for comparison, it is just one byte in iso8859-1), it simply displays those two bytes as iso8859-1 characters. </div><div><br></div><div>The problem with your file is that you created it in XTherion using iso8859-1 encoding, but then edited it in VSCode. VSCode editor assumed the file was utf-8 encoded (it ignores the information on the first line, which is therion-specific) and then encountered one-byte "ö" representation, displaying it as an unknown character. You replaced that with "ö" in VSCode and saved the file in utf-8, resulting in a two-byte representation of "ö" in the file. Since the file became utf-8 encoded, you should have modified the first line to "encoding utf-8".</div><div><br></div><div>So, there is no problem in Therion at all, you just need to ensure the encoding specification matches the file's actual encoding. The easiest way is to use utf-8 everywhere.</div><div><br></div><div>Martin</div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, May 29, 2026 at 9:04 AM Torsten Schnitter <<a href="mailto:torsten.schnitter@netcologne.de">torsten.schnitter@netcologne.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi Martin</p>
<p>As you can see on the screenshots the file format from Xtherion editor is the same as the first line of the file.<br>(but real file format seems to be UTF-8 as Visual Studio Code is saying)<br>When I change the file format with XTherion the first line (not shown in XTherion editor) is autmatically changed corresponding.</p>
<div id="m_9005847710204681246signature"></div>
<p><img src="cid:ii_19e72a3e9289bfcb0831" width="732" height="239"></p>
<p><img src="cid:ii_19e72a3e9284af636b62" width="729" height="313"></p>
<p>The file was created and edited with XTherion editor. Resulting in that problem.<br>My only solution was to edit the file in an external editor (without changing file format).<br>This does work now but the character within Xtherion editor is corrupted...</p>
<p>For me there is a file format problem inside XTherion (may be with special circumstances).<br>Or someone can explain to me what I did wrong.</p>
<p>regards, Torsten</p>
<p><br></p>
<p id="m_9005847710204681246reply-intro">Am 2026-05-28 17:31, schrieb Martin Budaj:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div id="m_9005847710204681246replybody1">
<div dir="ltr">Hi,
<div> </div>
<div>there is a simple rule: the encoding given in the first line of the .th file should match the actual file encoding.</div>
<div> </div>
<div>If you reencode your file to another encoding, you must modify the first line (encoding xxx) accordingly.</div>
<div> </div>
<div>Martin</div>
</div>
<br>
<div>
<div dir="ltr">On Thu, May 28, 2026 at 3:41 PM Torsten Schnitter <<a href="mailto:torsten.schnitter@netcologne.de" rel="noreferrer" target="_blank">torsten.schnitter@netcologne.de</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi all</p>
<p>Problem found and solved.</p>
<p>I do use commands to import different layouts inside the thconfig file:<br>  input ..\_Therion\_Layouts\<a href="http://area_blocks_hdens.th" rel="noopener noreferrer" target="_blank">area_blocks_hdens.th</a></p>
<p>This file was edited with XTherion and saved as "iso8859-1":<br><img src="cid:ii_19e72a3e92894276fd53" width="691" height="232"><br>As someone can see: text de .... seems to be OK (especially the character ö)</p>
<p>When opening this file with Visual Studio Code it looks like:<br><img src="cid:ii_19e72a3e928ded9930e4" width="688" height="310"><br>Now the character does NOT look ok (and format of file is UTF-8 as you can see at the bottom of the screenshot)</p>
<div id="m_9005847710204681246v1m_5079373648216132927signature"></div>
<p>Just changing within Visual Studio Code this single character in line 2 (not changing the format) and saving the file does solve the problem:<br><img src="cid:ii_19e72a3e9285651955e5" width="688" height="313"></p>
<p>But now the file looks somehow wrong inside XTherion:<br><img src="cid:ii_19e72a3e928b12870236" width="683" height="233"></p>
<p><br></p>
<p>Seems to be a problem with XTherin file editor and file formats....<br>Attached the actual and working layout file.</p>
<p>For me I will not use XTherion file editor anymore and will edit files with Visual Studio Code.</p>
<p>best regards, Torsten</p>
<p><br></p>
<p id="m_9005847710204681246v1m_5079373648216132927reply-intro">Am 2026-05-28 12:07, schrieb <a href="mailto:knollesimage@t-online.de" rel="noreferrer" target="_blank">knollesimage@t-online.de</a>:</p>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div id="m_9005847710204681246v1m_5079373648216132927replybody1" lang="DE">
<div>
<p><span>Same <span>behavior</span> <span>here</span>:</span></p>
<p><span>Running <span>therion</span> 6.4.0 on a <span>thconfig</span> file automatically inserts "encoding UTF-8" in the first line, if it is not there already.</span></p>
<p><span> </span></p>
<p><span>Regards, Michael.</span></p>
<p><span> </span></p>
<div>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0cm 0cm">
<p><strong><span>From:</span></strong><span> <span>Therion</span> <<a href="mailto:therion-bounces@speleo.sk" rel="noreferrer" target="_blank">therion-bounces@speleo.sk</a>> <strong>On Behalf Of </strong><span>Torsten</span> <span>Schnitter</span><br><strong>Sent:</strong> <span>Mittwoch</span>, 27. Mai 2026 14:00<br><strong>To:</strong> <span>Therion</span> <<a href="mailto:therion@speleo.sk" rel="noreferrer" target="_blank">therion@speleo.sk</a>><br><strong>Subject:</strong> [<span>Therion</span>] Compiling error due to encoding</span></p>
</div>
</div>
<p><br></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">Hello</span></p>
<p style="margin-bottom:12pt"><span style="font-size:10pt;font-family:Verdana,sans-serif">I <span>have</span> a <span>thconfig</span> <span>file</span> <span>where</span> I <span>use</span> <span>the</span> <span>statement</span> "<span>language</span> de"/"<span>language</span> en" <span>to</span> switch <span>language</span> <span>for</span> <span>the</span> <span>output</span>.<br><span>Within</span> <span>the</span> <span>config</span> <span>file</span> I <span>use</span> <span>some</span> <span>translations</span> like <span>this</span>:<br>...<br>   <span>text</span> de "<span>point</span> <span>passage-height:unsigned</span>" "<span>Ganghöhe</span>"<br>...<br>   <span>text</span> en "<span>point</span> <span>passage-height:unsigned</span>" "<span>passage</span> <span>height</span>"</span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">Every time I <span>try</span> <span>to</span> <span>compile</span> <span>with</span> "<span>language</span> de" I <span>get</span> an <span>error</span>:</span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">#################### end <span>of</span> <span>metapost</span> log <span>file</span> ####################<br><span>converting</span> <span>scraps</span> ... <span>done</span><br>C:\Program Files\<span>Therion</span>\therion.exe: <span>error</span> -- Invalid utf-8 <span>string</span>!<br><span>writing</span> <span>xtherion</span> <span>file</span> ... <span>done</span></span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">As <span>soon</span> <span>as</span> I switch back <span>to</span> "<span>language</span> en" <span>it</span> <span>does</span> <span>work</span>.<br><span>Therefore</span> <span>I'm</span> <span>pretty</span> <span>sure</span> <span>it</span> <span>is</span> due <span>to</span> <span>the</span> <span>special</span> <span>characters</span> like 'ö'.</span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">I <span>opened</span> <span>the</span> <span>thconfig</span> <span>file</span> <span>with</span> an external <span>editor</span> (Visual Studio Code), <span>removed</span> <span>the</span> <span>first</span> <span>line</span> "<span>encoding</span> utf-8" and <span>saved</span> <span>the</span> <span>file</span> <span>with</span> <span>encoding</span> "ISO 8859-1".</span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">As <span>soon</span> <span>as</span> I open <span>the</span> <span>thconfig</span> <span>file</span> <span>with</span> <span>XTherion</span> and <span>start</span> <span>compile</span> <span>the</span> <span>format</span> <span>is</span> <span>resetted</span> <span>to</span> utf-8 and <span>within</span> <span>the</span> <span>thconfig</span> <span>file</span> <span>the</span> <span>first</span> <span>line</span> <span>is</span> <span>replaced</span> <span>to</span> "<span>encoding</span> utf-8" (checke <span>this</span> <span>again</span> <span>with</span> Visual Studio Code". And <span>the</span> <span>error</span> <span>above</span> <span>is</span> <span>the</span> <span>result</span>.<br><span>Only</span> <span>opening</span> <span>the</span> <span>config</span> <span>file</span> and <span>closing</span> <span>again</span> <span>without</span> <span>any</span> <span>changes</span> <span>does</span> <span>change</span> <span>the</span> <span>encoding</span> <span>line</span> in <span>the</span> <span>config</span> <span>file</span> <span>to</span> utf-8.</span></p>
<p><span><span style="font-size:10pt;font-family:Verdana,sans-serif">I'm</span></span><span style="font-size:10pt;font-family:Verdana,sans-serif"> <span>using</span> <span>Therion</span> 6.4.0 and <span>can't</span> <span>remeber</span> <span>when</span> <span>this</span> <span>behaviour</span>/<span>problem</span> <span>raised</span>.<br><span>I'm</span> <span>pretty</span> <span>sure</span> <span>some</span> time <span>ago</span> <span>this</span> <span>did</span> <span>work</span> <span>without</span> <span>error</span>.</span></p>
<p><span style="font-size:10pt;font-family:Verdana,sans-serif">Any <span>help</span> <span>is</span> <span>appreciated</span>. <span>Thanks</span> in <span>advance</span>!<br><span>regards</span>, Torsten</span></p>
</div>
</div>
<br>
<div style="margin:0px;padding:0px;font-family:monospace">_______________________________________________<br>Therion mailing list<br><a href="mailto:Therion@speleo.sk" rel="noreferrer" target="_blank">Therion@speleo.sk</a><br><a href="https://mailman.speleo.sk/listinfo/therion" rel="noopener noreferrer" target="_blank">https://mailman.speleo.sk/listinfo/therion</a></div>
</blockquote>
<p><br></p>
</div>
_______________________________________________<br>Therion mailing list<br><a href="mailto:Therion@speleo.sk" rel="noreferrer" target="_blank">Therion@speleo.sk</a><br><a href="https://mailman.speleo.sk/listinfo/therion" rel="noopener noreferrer" target="_blank">https://mailman.speleo.sk/listinfo/therion</a></blockquote>
</div>
</div>
<br>
<div style="margin:0px;padding:0px;font-family:monospace">_______________________________________________<br>Therion mailing list<br><a href="mailto:Therion@speleo.sk" target="_blank">Therion@speleo.sk</a><br><a href="https://mailman.speleo.sk/listinfo/therion" rel="noopener noreferrer" target="_blank">https://mailman.speleo.sk/listinfo/therion</a></div>
</blockquote>
</div>
_______________________________________________<br>
Therion mailing list<br>
<a href="mailto:Therion@speleo.sk" target="_blank">Therion@speleo.sk</a><br>
<a href="https://mailman.speleo.sk/listinfo/therion" rel="noreferrer" target="_blank">https://mailman.speleo.sk/listinfo/therion</a><br>
</blockquote></div>