deanmalmgren/textract — pull request #53 by deanmalmgren (2014-08-14 13:01:39+00:00)
Title: .odf and .pdf : Dealing with special characters and white space

I wrote a file with LibreOffice (4.2.3.x) named 'Àéìøèãò áîëñîí ÿâäàë.odt' containing the characters 'Àéìøèãò áîëñîí ÿâäàë' and export it in PDF.

I then try to extract txt of the two files. Here are the results:

ODT to TXT : Didn't recognize specials characters:
> /tmp # textract Àéìøèãò\ áîëñîí\ ÿâäàë.odt
> ??????? ?????? ?????

PDF to TXT (via poppler) can't deal with filename containing white characters:
> /tmp # textract Àéìøèãò\ áîëñîí\ ÿâäàë.pdf
> The command `pdftotext Àéìøèãò áîëñîí ÿâäàë.pdf -` failed with exit code 99

PDF to TXT is able to display special characters contained in a file if we remove white space of the filename :
> /tmp # mv Àéìøèãò\ áîëñîí\ ÿâäàë.pdf Àéìøèãò_áîëñîí_ÿâäàë.pdf
> /tmp # textract Àéìøèãò_áîëñîí_ÿâäàë.pdf
> Àéìøèãò áîëñîí ÿâäàë