如何使用'catdoc'显示以UTF-8编码的Dock文件 [英] How to use 'catdoc' to display dock file encoded in utf-8

查看:55
本文介绍了如何使用'catdoc'显示以UTF-8编码的Dock文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多docx文件,我想在终端上阅读它们.我找到了catdoc http://www.wagner.pp.ru/~vitus/software/catdoc/

I have a a lot of docx files and I want to read them on terminal. And I found catdoc http://www.wagner.pp.ru/~vitus/software/catdoc/

当我使用它时,输出只是不可读的字符.我的docx文件以utf-8编码.我尝试了"catdoc -u my_file.docx",但不起作用.

When I use it, the output are just unreadable chars. My docx files are encoded in utf-8. I tried "catdoc -u my_file.docx" but does not work.

请帮助.非常感谢.

推荐答案

docx是压缩的XML文件.

docx are zipped XML files.

要提取和剥离XML,请尝试基于

To extract and strip the XML try something based on

unzip -p "*.docx" word/document.xml | sed -e 's/<[^>]\{1,\}>//g; s/[^[:print:]]\{1,\}//g'

来自命令行fu

这篇关于如何使用'catdoc'显示以UTF-8编码的Dock文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆