以c#编码类型转换文档. [英] Converting document in c#, Encoding types.
本文介绍了以c#编码类型转换文档.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在转换为e.x时遇到小问题,我无法使用(System.Text.Encoding.Default)对扩展名为.txt的文件int记事本进行编码
但是我不知道如何对我使用的Word文档进行编码(System.Text.Encoding.Utf8,System.Text.Encoding.Utf7和所有其他属性,但是无效)???
I have a small problem with converting for e.x I cant encode the file int notepad that are with .txt extension using (System.Text.Encoding.Default)
But I dont know how to encode word document I used (System.Text.Encoding.Utf8, System.Text.Encoding.Utf7 and all other properties but didn''t work ) ???
推荐答案
尽管您的问题一词并不完全合理,但我认为您的意思是:
1您已成功使软件编写纯文本文件.
2您的软件无法以MS Word可以打开它的方式编写Microsoft Word文档.
问题在于Word文档是一件非常复杂的事情.它能够存储几乎所有您想放入系列书籍中的任何内容的格式信息.此外,没有公开可用的规范AFAIK.
但是有专业类 [ ^ ]用于处理Word文档.使用它们可能需要在目标计算机上安装Microsoft Word.
Although by the word your question doesn''t exactly make sense, I assume you mean the following:
1 You have successfully made your software write a plain text file.
2 Your software failed writing a Microsoft Word document in a way that MS Word could open it.
The problem is that a Word document is a very complex thing. It is able to store format information for almost anything you can ever think of putting into a series of books. Additionally, there is no publically available specification AFAIK.
But there are specialized classes[^] for dealing with Word documents. Using them may need Microsoft Word to be installed on the target machine.
这篇关于以c#编码类型转换文档.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文