[Checkins] SVN: zc.preview/trunk/src/zc/preview/text.txt make test pass on trunk

Gary Poster gary at zope.com
Thu Mar 15 10:56:18 EDT 2007


Log message for revision 73193:
  make test pass on trunk

Changed:
  U   zc.preview/trunk/src/zc/preview/text.txt

-=-
Modified: zc.preview/trunk/src/zc/preview/text.txt
===================================================================
--- zc.preview/trunk/src/zc/preview/text.txt	2007-03-15 14:20:14 UTC (rev 73192)
+++ zc.preview/trunk/src/zc/preview/text.txt	2007-03-15 14:56:17 UTC (rev 73193)
@@ -5,7 +5,7 @@
 The "preview" for plain text is simple.  It deals with documents for
 which the encoding is known, including the case of the "known"
 encoding not working with the actual data, and the case where the
-encoding is not known at all.  For the later, some attempts to guess
+encoding is not known at all.  For the latter, some attempts to guess
 common text encodings is attempted.
 
   >>> import StringIO
@@ -35,9 +35,10 @@
 note about the current encoding (since it is known)::
 
   >>> browser.getLink("sample-1.txt").click()
-  >>> print browser.contents
-  <...utf-8...
-  ...Plain text in Latin-1: ...
+  >>> browser.headers['content-type'] # we're displaying in utf-8...
+  'text/html;charset=utf-8'
+  >>> print browser.contents # ...even though the source is Latin-1
+  <...Plain text in Latin-1: ...
 
 If we don't provide encoding information when we create the document,
 but use an encoding that's easily recognizable, we'll still be able to



More information about the Checkins mailing list