added setdefaultencoding method so reload(sys) not needed
reload(sys) could cause problem in user code - ie, sys.stdout, excepthook, and displayhook would be reset, etc
This commit is contained in:
		 Paul Molodowitch
					Paul Molodowitch
				
			
				
					committed by
					
						 Lance Stout
						Lance Stout
					
				
			
			
				
	
			
			
			 Lance Stout
						Lance Stout
					
				
			
						parent
						
							a22ca228cc
						
					
				
				
					commit
					52feabbe76
				
			| @@ -69,8 +69,8 @@ use ASCII. We can get Python to use UTF-8 as the default encoding by including: | ||||
| .. code-block:: python | ||||
|  | ||||
|     if sys.version_info < (3, 0): | ||||
|         reload(sys) | ||||
|         sys.setdefaultencoding('utf8') | ||||
|         from sleekxmpp.util.misc_ops import setdefaultencoding | ||||
|         setdefaultencoding('utf8') | ||||
|  | ||||
| .. warning:: | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user