Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with encoding (docx -> txt) #340

Closed
fuelen opened this issue Jun 1, 2016 · 4 comments
Closed

problem with encoding (docx -> txt) #340

fuelen opened this issue Jun 1, 2016 · 4 comments

Comments

@fuelen
Copy link

fuelen commented Jun 1, 2016

Hi.
I have *.docx file with cyrillic symbols and I want to convert it to *.txt.
On my machine with Arch Linux converting works correctly.

$ unoconv --version
unoconv 0.7
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/
platform posix/linux
python 3.5.1 (default, Mar  3 2016, 09:29:07) 
[GCC 5.3.0]
LibreOffice 5.0.6.3

command

$ unoconv --listener & sleep 2 && unoconv -v -f txt -o tmp/file.txt tmp/file.docx`
file tmp/file.txt 
tmp/file.txt: UTF-8 Unicode (with BOM) text, with very long lines

But on the server I run unoconv in docker

docker run -i --rm -v /long_path:/uploads -v /long_path2:/out site.com:5000/unoconv /bin/bash -c 'unoconv --listener & sleep 2 && unoconv -v -f txt -o /out/file.txt /uploads/file.docx && chown -R 1001:1001 /out'
and on output i get file without utf-8 encoding (слово -> ?????).

$ file  /long_path2/file.txt
file.txt: ISO-8859 text, with very long lines
unoconv 0.7
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/
platform posix/linux
python 3.5.1+ (default, Mar 30 2016, 22:46:26) 
[GCC 5.3.1 20160330]
LibreOffice 5.1.2.2

any ideas?

@dzmitry-lahoda
Copy link

@fuelen was you able to solve the problem? I have same issue on windows.

@dzmitry-lahoda
Copy link

try -f text. Seems txt is ansi, text is any. I guess default docs should say text, not txt.

@fuelen
Copy link
Author

fuelen commented Dec 8, 2018

@dzmitry-lahoda unfortunately, I don't remember.

@regebro
Copy link
Member

regebro commented Feb 28, 2019

Seems to be solved.

@regebro regebro closed this as completed Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants