[Therion] Compiling error due to encoding

Martin Budaj m.budaj at gmail.com
Thu May 28 17:31:42 CEST 2026


Hi,

there is a simple rule: the encoding given in the first line of the .th
file should match the actual file encoding.

If you reencode your file to another encoding, you must modify the first
line (encoding xxx) accordingly.

Martin

On Thu, May 28, 2026 at 3:41 PM Torsten Schnitter <
torsten.schnitter at netcologne.de> wrote:

> Hi all
>
> Problem found and solved.
>
> I do use commands to import different layouts inside the thconfig file:
>   input ..\_Therion\_Layouts\area_blocks_hdens.th
>
> This file was edited with XTherion and saved as "iso8859-1":
>
> As someone can see: text de .... seems to be OK (especially the character
> ö)
>
> When opening this file with Visual Studio Code it looks like:
>
> Now the character does NOT look ok (and format of file is UTF-8 as you can
> see at the bottom of the screenshot)
>
> Just changing within Visual Studio Code this single character in line 2
> (not changing the format) and saving the file does solve the problem:
>
> But now the file looks somehow wrong inside XTherion:
>
>
> Seems to be a problem with XTherin file editor and file formats....
> Attached the actual and working layout file.
>
> For me I will not use XTherion file editor anymore and will edit files
> with Visual Studio Code.
>
> best regards, Torsten
>
>
> Am 2026-05-28 12:07, schrieb knollesimage at t-online.de:
>
> Same behavior here:
>
> Running therion 6.4.0 on a thconfig file automatically inserts "encoding
> UTF-8" in the first line, if it is not there already.
>
>
>
> Regards, Michael.
>
>
>
> *From:* Therion <therion-bounces at speleo.sk> *On Behalf Of *Torsten
> Schnitter
> *Sent:* Mittwoch, 27. Mai 2026 14:00
> *To:* Therion <therion at speleo.sk>
> *Subject:* [Therion] Compiling error due to encoding
>
>
>
> Hello
>
> I have a thconfig file where I use the statement "language de"/"language
> en" to switch language for the output.
> Within the config file I use some translations like this:
> ...
>    text de "point passage-height:unsigned" "Ganghöhe"
> ...
>    text en "point passage-height:unsigned" "passage height"
>
> Every time I try to compile with "language de" I get an error:
>
> #################### end of metapost log file ####################
> converting scraps ... done
> C:\Program Files\Therion\therion.exe: error -- Invalid utf-8 string!
> writing xtherion file ... done
>
>
>
> As soon as I switch back to "language en" it does work.
> Therefore I'm pretty sure it is due to the special characters like 'ö'.
>
> I opened the thconfig file with an external editor (Visual Studio Code),
> removed the first line "encoding utf-8" and saved the file with encoding
> "ISO 8859-1".
>
> As soon as I open the thconfig file with XTherion and start compile the
> format is resetted to utf-8 and within the thconfig file the first line is
> replaced to "encoding utf-8" (checke this again with Visual Studio Code".
> And the error above is the result.
> Only opening the config file and closing again without any changes does
> change the encoding line in the config file to utf-8.
>
> I'm using Therion 6.4.0 and can't remeber when this behaviour/problem
> raised.
> I'm pretty sure some time ago this did work without error.
>
> Any help is appreciated. Thanks in advance!
> regards, Torsten
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
>
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260528/68f0af31/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2709786a.png
Type: image/png
Size: 35061 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260528/68f0af31/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: af86fea2.png
Type: image/png
Size: 39657 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260528/68f0af31/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcfa80a0.png
Type: image/png
Size: 39437 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260528/68f0af31/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2e9ea3a8.png
Type: image/png
Size: 34194 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260528/68f0af31/attachment-0007.png>


More information about the Therion mailing list