Show '\011', '\012', and '\015' as '\t', '\n', '\r' in strings.
Switch from octal escapes to hex escapes for other nonprintable characters.
diff --git a/Doc/lib/liblinecache.tex b/Doc/lib/liblinecache.tex
index f491d4c..8a9b914 100644
--- a/Doc/lib/liblinecache.tex
+++ b/Doc/lib/liblinecache.tex
@@ -41,5 +41,5 @@
 \begin{verbatim}
 >>> import linecache
 >>> linecache.getline('/etc/passwd', 4)
-'sys:x:3:3:sys:/dev:/bin/sh\012'
+'sys:x:3:3:sys:/dev:/bin/sh\n'
 \end{verbatim}
diff --git a/Doc/lib/liblocale.tex b/Doc/lib/liblocale.tex
index 974d696..107c21d 100644
--- a/Doc/lib/liblocale.tex
+++ b/Doc/lib/liblocale.tex
@@ -265,7 +265,7 @@
 >>> import locale
 >>> loc = locale.setlocale(locale.LC_ALL) # get current locale
 >>> locale.setlocale(locale.LC_ALL, 'de') # use German locale
->>> locale.strcoll('f\344n', 'foo') # compare a string containing an umlaut 
+>>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut 
 >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
 >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale
 >>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale
diff --git a/Doc/lib/libmd5.tex b/Doc/lib/libmd5.tex
index bec1132..f471bae 100644
--- a/Doc/lib/libmd5.tex
+++ b/Doc/lib/libmd5.tex
@@ -25,14 +25,14 @@
 >>> m.update("Nobody inspects")
 >>> m.update(" the spammish repetition")
 >>> m.digest()
-'\273d\234\203\335\036\245\311\331\336\311\241\215\360\377\351'
+'\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9'
 \end{verbatim}
 
 More condensed:
 
 \begin{verbatim}
 >>> md5.new("Nobody inspects the spammish repetition").digest()
-'\273d\234\203\335\036\245\311\331\336\311\241\215\360\377\351'
+'\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9'
 \end{verbatim}
 
 \begin{funcdesc}{new}{\optional{arg}}
diff --git a/Doc/lib/libparser.tex b/Doc/lib/libparser.tex
index 96256ad..9ff3f42 100644
--- a/Doc/lib/libparser.tex
+++ b/Doc/lib/libparser.tex
@@ -432,7 +432,7 @@
                (297,
                 (298,
                  (299,
-                  (300, (3, '"""Some documentation.\012"""'))))))))))))))))),
+                  (300, (3, '"""Some documentation.\n"""'))))))))))))))))),
    (4, ''))),
  (4, ''),
  (0, ''))
@@ -537,7 +537,7 @@
 >>> found
 1
 >>> vars
-{'docstring': '"""Some documentation.\012"""'}
+{'docstring': '"""Some documentation.\n"""'}
 \end{verbatim}
 
 Once specific data can be extracted from a location where it is
diff --git a/Doc/lib/libpyexpat.tex b/Doc/lib/libpyexpat.tex
index 27edc08..b50c52d 100644
--- a/Doc/lib/libpyexpat.tex
+++ b/Doc/lib/libpyexpat.tex
@@ -272,11 +272,11 @@
 Start element: child1 {'name': 'paul'}
 Character data: 'Text goes here'
 End element: child1
-Character data: '\012'
+Character data: '\n'
 Start element: child2 {'name': 'fred'}
 Character data: 'More text'
 End element: child2
-Character data: '\012'
+Character data: '\n'
 End element: parent
 \end{verbatim}
 
diff --git a/Doc/lib/librotor.tex b/Doc/lib/librotor.tex
index ba7c402..e1db8ef 100644
--- a/Doc/lib/librotor.tex
+++ b/Doc/lib/librotor.tex
@@ -68,17 +68,17 @@
 >>> import rotor
 >>> rt = rotor.newrotor('key', 12)
 >>> rt.encrypt('bar')
-'\2534\363'
+'\xab4\xf3'
 >>> rt.encryptmore('bar')
-'\357\375$'
+'\xef\xfd$'
 >>> rt.encrypt('bar')
-'\2534\363'
->>> rt.decrypt('\2534\363')
+'\xab4\xf3'
+>>> rt.decrypt('\xab4\xf3')
 'bar'
->>> rt.decryptmore('\357\375$')
+>>> rt.decryptmore('\xef\xfd$')
 'bar'
->>> rt.decrypt('\357\375$')
-'l(\315'
+>>> rt.decrypt('\xef\xfd$')
+'l(\xcd'
 >>> del rt
 \end{verbatim}
 
diff --git a/Doc/lib/libstruct.tex b/Doc/lib/libstruct.tex
index 434b433..637d3e6 100644
--- a/Doc/lib/libstruct.tex
+++ b/Doc/lib/libstruct.tex
@@ -168,8 +168,8 @@
 \begin{verbatim}
 >>> from struct import *
 >>> pack('hhl', 1, 2, 3)
-'\000\001\000\002\000\000\000\003'
->>> unpack('hhl', '\000\001\000\002\000\000\000\003')
+'\x00\x01\x00\x02\x00\x00\x00\x03'
+>>> unpack('hhl', '\x00\x01\x00\x02\x00\x00\x00\x03')
 (1, 2, 3)
 >>> calcsize('hhl')
 8