daisy / word-save-as-daisy

"Save as DAISY" add-in for Microsoft Word
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

Characters in filename and document properties break Save as DAISY #41

Open ways2read opened 9 months ago

ways2read commented 9 months ago

A Word document has the filename Druhý sešit směšných lásek (Czech language) and same for titlein document properties.

Save as DAISY throws "An unexpected error occurs" when saving as DTBOOK XML on two different machines.

org.daisy.pipeline.core.script.datatype.DatatypeException: Input file 'C:\Users\Rorme\AppData\Local\Temp\Druhý sešit smešných lásek.xml' does not exist.
    at org.daisy.pipeline.core.script.datatype.FileDatatype.validate(FileDatatype.java:44)
    at org.daisy.pipeline.core.script.JobParameter.setValue(JobParameter.java:74)
    at org.daisy.pipeline.core.script.Job.setParameterValue(Job.java:142)
    at org.daisy.pipeline.lite.PipelineLiteCLI.createJob(PipelineLiteCLI.java:188)
    at org.daisy.pipeline.lite.PipelineLiteCLI.main(PipelineLiteCLI.java:99)

Renamed the source file and the process runs, but the folder that is opened is empty. Browsing to a parent document and the XML is there. Changed the document title in the properties and the XML is saved in the correct location. The XML is then edited to fix the title.

The document can be shared for debugging as necessary but won't be posted here to respect the rights issues.

ways2read commented 9 months ago

Update: I did some more testing; the conversion is successful when the filename is not using accented characters. It seems I can keep the correct characters in the document property and Save as DAISY is OK with this..

NPavie commented 9 months ago

Hi @ways2read ,

Thanks for the feedback, I'll do some quick tests.

NPavie commented 9 months ago

@ways2read can you try the conversion with the latest test version of the addin ? https://github.com/daisy/word-save-as-daisy/releases/tag/v2.8.4-beta

From the exception message, the issue seems linked to an engine or API issue on the daisy pipeline side. I was not able to reproduce it with the previous 2.8.3 test release, that includes an update of the DAISY Pipeline and of the addin bindings to it, that might have fixed this issue reported here.