如何知道Txt文件的完整格式结构? [英] How Can I Know The Complete Format Structure Of The Txt File ?

查看:659
本文介绍了如何知道Txt文件的完整格式结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,

我是编程新手,我正在研究文件格式。

i想知道某些文件格式的存储机制,如.txt ,.doc等..

逐字节,包含格式的所有信息。

Guys,
I am new to programming,i am interseted to study the file formats.
i wanted to know the storing mechanism of the some file formats like .txt,.doc etc..
in byte by byte with all the information regarding the format.

推荐答案

对不起,但这不是我们可以回答一个问题 - 有几个原因。
首先.TXT文件没有结构:它们只是文本,你可以在其中存储任何形式的文本,但是文本是如果创建它们的应用程序(或用户)将某些应用于实际数据,则contains可能具有结构。例如,您可以将整本书存储在TXT文件中,并将其分为章节,页面和段落。或者您可以存储以逗号分隔的数据并使用行来分隔行。

即便如此,.TXT扩展名并不意味着您可以读取它 - 扩展名不是固定且任何应用程序无论内容如何,​​都可以创建任何扩展名的文件。



更糟糕的是,.DOC是一个常见的扩展,可以引用数百个应用数据中的任何一个,但即便如此由Microsoft Word生成,实际内容有许多不同(和不兼容)的版本 - 因此没有.DOC文件格式可以保证与所有文件一起使用。



如果您需要了解特定的文件格式,请从此处开始:文件格式列表 - 维基百科,免费百科全书 [ ^ ] - 但不要指望自己处理它们是一件小事!
Sorry, but this isn't a question we can answer - and there are several reasons.
Firstly .TXT files don't have a structure: they are just text and you can store any form of text in them, but the text they contain may have structure if the application (or user) who created them applied some to the actual data. For example, you could store a whole book in a TXT file, and orginse it into chapters, pages and paragraphs. Or you could store data separated by commas and using lines to delimit rows.
Even then, the .TXT extension doesn't mean that you can read it - extensions aren't "fixed" and any application can create a file with any extension regardless of the content.

And worse, .DOC is a common extension that could refer to any of hundreds of applicatiosn data, but even produced by Microsoft Word, there have been a number of different (and incompatible) versions of the actual content - so there is no ".DOC" file format that is guaranteed to work with all files.

If you need to know about a specific file format, then start here: List of file formats - Wikipedia, the free encyclopedia[^] - but don't expect it to be a trivial matter to process them yourself!


这篇关于如何知道Txt文件的完整格式结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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