[Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.69,2.70

A.M. Kuchling python-dev@python.org
Tue, 19 Dec 2000 14:49:09 -0800


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv18623

Modified Files:
	unicodeobject.c 
Log Message:
Patch #102940: use only printable Unicode chars in reporting
 incorrect % characters; characters outside the printable range are 
 replaced with '?'


Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -r2.69 -r2.70
*** unicodeobject.c	2000/12/19 02:23:19	2.69
--- unicodeobject.c	2000/12/19 22:49:06	2.70
***************
*** 5070,5074 ****
  			     "unsupported format character '%c' (0x%x) "
  			     "at index %i",
! 			     c, c, fmt -1 - PyUnicode_AS_UNICODE(uformat));
  		goto onError;
  	    }
--- 5070,5075 ----
  			     "unsupported format character '%c' (0x%x) "
  			     "at index %i",
! 			     (31<=c && c<=126) ? c : '?', 
!                              c, fmt -1 - PyUnicode_AS_UNICODE(uformat));
  		goto onError;
  	    }