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

竟然不支持.txt文档在线预览? #4

Closed
tansuo1989 opened this issue Jun 11, 2018 · 5 comments
Closed

竟然不支持.txt文档在线预览? #4

tansuo1989 opened this issue Jun 11, 2018 · 5 comments

Comments

@tansuo1989
Copy link

看到这个提示:当前格式(txt)文档暂时不支持在线预览,请下载原文档对内容进行浏览。

复杂的实现了,最简单的却忘了。

@TruthHun
Copy link
Owner

你好。之前其实是实现了txt在线浏览的,但是后来发现,gbk编码或者其他一些txt在通过soffice转成PDF的时候,出现了乱码。txt的,会尽快想办法解决。如果你有什么好的解决办法,也可以提出来。也欢迎你加入我们的QQ交流群,QQ交流群:457803862(猿军团)

@tansuo1989
Copy link
Author

噢,原来是转pdf的时候有问题,我没有转过。
但,先把gbk转成utf-8,再转pdf也会有乱码的问题吗?

@dancelion
Copy link

我之前项目用的Unoconv转换的pdf,目前没发现乱码的问题

@hueidou
Copy link

hueidou commented Sep 13, 2018

不清楚这个问题是否解决。如果没有,考虑Mozilla Universal Charset Detector,应该算是比较标准的方式。

有些语言有专用的库来判断文本编码,大都是根据文本特征进行判断,返回最准确的编码。不过都是有误判。

@TruthHun
Copy link
Owner

目前已支持txt在线阅读

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

4 participants