Tiddler losing accent marks on drag and drop import

I have a python job that produces tiddler output, I had been pasting the content into a tiddler and saving but tonight I adjusted the output to include the desired tiddler fields and out put a .tid file so I could drag and drop import and save steps.

Worked great, except I lost formatting associated with names containing accent marks.

��bhear instead of Éïbhear

If I cut and paste to content of the text field only the accent marks are displayed appropriately.

Any ideas on what I may have fat fingered?

examples:
Good Tiddler from cut and paste.
Bad Tiddler from drag and drop.

Example .tid file for drag and drop:

created: 20220411221100
creator: Drevarr
curTab: Overview
tags: Logs
title: Test_Tid_File

Lots of data goes here...

Make sure the output file has UTF-8 encoding

import io
with io.open("Test_Tid_FIle","w",encoding="utf-8") as f:
    f.write(tiddler)
1 Like

Thank you, works like a charm.

output = open(args.output_filename, "w",encoding="utf-8")

Two possibilities to keep in mind in case they help your workflow:

  • you can generate a single JSON file with multiple tiddlers
  • if you are using the node.js server for TiddlyWiki, your python script can do a PUT request and directly create the new tiddlers in the TiddlyWiki
1 Like

I will look towards transitioning to the JSON file with multiple tiddlers. I like the possibilities that presents.

Thank you again.