Bug (Windows): [ or ] in path break FLExtext import

I just ran into a recreate-able bug in Windows 10 with ELAN 5.8. (I haven’t tested with other versions of OS or ELAN). I hope this is the correct place to report it.

When you have a square bracket character (i.e. [ or ] ) within the name of any directory OR the filename (i.e. the full file path), importing a .flextext file fails. It opens an empty project and the log file produces an ambiguous error which is unhelpful:

Dec 27, 2019 10:58:01 AM mpi.eudico.client.annotator.prefs.PreferencesWriter encodeAndSave
INFO: Writing preferences: C:\Users\MYUSERNAME.elan_data\elan.pfsx
IO error: unknown protocol: e
IO error: unknown protocol: e
IO error: unknown protocol: e
IO error: unknown protocol: e
IO error: unknown protocol: e
IO error: unknown protocol: e
IO error: unknown protocol: e
Dec 27, 2019 10:58:02 AM mpi.eudico.client.annotator.commands.ClipMediaCA <init>
INFO: No clipping script found!
Dec 27, 2019 10:58:02 AM mpi.eudico.client.annotator.prefs.PreferencesWriter encodeAndSave
INFO: Writing preferences: C:\Users\MYUSERNAME.elan_data\elan.pfsx

Removing the square bracket(s) from directories and the filename allows the import to proceed as expected. I can consistently recreate this behavior.

Note: if the media file which is linked has [ or ], the import works without a problem.

Square brackets are valid characters in Windows file paths. I’m not sure about OSX, but they are also valid in Linux.

Lastly, I can open .EAF files within directories with square brackets. This issue is limited to importing .flextext files. (Although, it’s probably worth checking other types of import also.)

Thanks for reporting this bug; yes, this is the correct place for it.

It appears that due to a programming error, the code that passes the file location in a proper way to the XML parser, is only invoked if the ‘Import participant information from “Note” field’ checkbox is checked. We’ll fix that for the next release.
For the time being, checking this checkbox might be a workaround to import such files, because it probably doesn’t ruin the import if e.g. there is no “Note” field at all (but I didn’t test this last situation).

-Han