[svnbook] r5372 committed - branches/1.8/zh/book/ch03-advanced-topics.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Mon Jul 24 07:22:45 CDT 2017


Revision: 5372
          http://sourceforge.net/p/svnbook/source/5372
Author:   wuzhouhui
Date:     2017-07-24 12:22:45 +0000 (Mon, 24 Jul 2017)
Log Message:
-----------
Branch 1.8/zh: translation of chapter 3 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch03-advanced-topics.xml

Modified: branches/1.8/zh/book/ch03-advanced-topics.xml
===================================================================
--- branches/1.8/zh/book/ch03-advanced-topics.xml	2017-07-23 15:39:44 UTC (rev 5371)
+++ branches/1.8/zh/book/ch03-advanced-topics.xml	2017-07-24 12:22:45 UTC (rev 5372)
@@ -3312,6 +3312,7 @@
     -->
         <title>识别文件类型</title>
     
+    <!--
         <para>Various programs on most modern operating systems make
           assumptions about the type and format of the contents of a
           file by the file's name, specifically its file extension.
@@ -3325,7 +3326,16 @@
           interpreted by software that understands the PNG format and
           can render the information in that format as a raster
           image.</para>
+    -->
+        <para>很多程序都会根据文件的名字—尤其是扩展名—对文件内容
+          的类型和格式作出一些假定, 比如说文件名以 <filename>.txt</filename> 结
+          尾的文件通常被认为是人类可读的, 也就是说用户可以通过简单的阅读来理解
+          文件的内容, 而不需要经过复杂的译解过程. 另一方面, 文件名以 <filename>
+            .png</filename> 结尾的文件通常会被当作便携式网络图形 (Portable
+          Network Graphics, PNG) 格式—它们不是人类可读的类型, 只有理解
+          PNG 格式的软件才能把文件内容以适当的形式展现出来.</para>
 
+    <!--
         <para>Unfortunately, some of those extensions have changed
           their meanings over time.  When personal computers first appeared,
           a file named <filename>README.DOC</filename> would have
@@ -3341,7 +3351,18 @@
           same era, WordPerfect also used <filename>.DOC</filename>
           for their proprietary file format's preferred
           extension!</para></footnote></para>
+    -->
+    <para>不幸的是, 有些扩展名的意义会随着时间而发生变化. 当个人计算机首次出
+      现时, 如果有一个名为 <filename>README.DOC</filename> 的文件, 那就几乎可
+      以确定它是个纯文本文件, 就像现在的 <filename>.txt</filename> 文件, 但是
+      在 90 年代中期, 同样名字的文件很可能是一个 Microsoft Word 文档, 它采用
+      了一种私有的, 人类不可读的文件格式. 不过这种变化并非一蹴而就—曾经
+      有一段时间, 当计算机用户看到一个 <filename>.DOC</filename> 文件时, 常常
+      想不清楚文件的格式到底是什么类型.<footnote><para>雪上加霜的是, 当时还
+          有一款叫作 WordPerfect 的软件也使用 <filename>.DOC</filename>
+          作为他们的私有文件格式的扩展名!</para></footnote></para>
 
+    <!--
         <para>The popularity of computer networking cast still more
           doubt on the mapping between a file's name and its content.
           With information being served across networks and generated
@@ -3353,7 +3374,15 @@
           display the data using a program registered to handle that
           datatype or to prompt the user for where on the client
           machine to store the downloaded data.</para>
+    -->
+        <para>计算机网络在文件名与文件类型的关系上更加疑惑. 信息跨网络地传输,
+          并且由服务器端的脚本动态生成, 本质上不能算作真正的文件, 也就不存在
+          文件名. 比如说, 网页服务器需要通过其他途径告诉浏览器它们正在下载的
+          文件是什么类型, 这样的话针对文件, 浏览器可以采取更加智能的做法, 比
+          如用一个对应的程序打开文件, 或提示用户应该把下载的文件放到哪个目录
+          下.</para>
 
+    <!--
         <para>Eventually, a standard emerged for, among other things,
           describing the contents of a data stream.  In 1996, RFC 2045
           was published.  It was the first of five RFCs describing
@@ -3364,6 +3393,12 @@
           email applications, web servers, and other software as the
           de facto mechanism for clearing up the file content
           confusion.</para>
+    -->
+        <para>最终, 终于有一个描述数据流内容的标准出现了. 1996 年, RFC 2045
+          发布, 它是描述 MIME 的 5 篇 RFC 文档的第一篇. 文档介绍的概念包括
+          媒体类型及其子类型, 并推荐了一种表示这些类型的语法. 如今, MIME 媒体
+          类型—或 <quote>MIME 类型</quote>—被广泛地应用在邮件程序,
+          网页服务器等软件中, 作为一种解决文件内容格式混乱的事实标准.</para>
 
       </sidebar>
     




More information about the svnbook-dev mailing list