mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Fix encoding errors
config.h is encoded in UTF-8.
This commit is contained in:
		
							parent
							
								
									90b30b618b
								
							
						
					
					
						commit
						0fa5efb7ce
					
				@ -246,7 +246,7 @@ class ConfigFile(Config):
 | 
				
			|||||||
        super().__init__()
 | 
					        super().__init__()
 | 
				
			||||||
        self.filename = filename
 | 
					        self.filename = filename
 | 
				
			||||||
        self.current_section = 'header'
 | 
					        self.current_section = 'header'
 | 
				
			||||||
        with open(filename) as file:
 | 
					        with open(filename, 'r', encoding='utf-8') as file:
 | 
				
			||||||
            self.templates = [self._parse_line(line) for line in file]
 | 
					            self.templates = [self._parse_line(line) for line in file]
 | 
				
			||||||
        self.current_section = None
 | 
					        self.current_section = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -314,7 +314,7 @@ class ConfigFile(Config):
 | 
				
			|||||||
        """
 | 
					        """
 | 
				
			||||||
        if filename is None:
 | 
					        if filename is None:
 | 
				
			||||||
            filename = self.filename
 | 
					            filename = self.filename
 | 
				
			||||||
        with open(filename, 'w') as output:
 | 
					        with open(filename, 'w', encoding='utf-8') as output:
 | 
				
			||||||
            self.write_to_stream(output)
 | 
					            self.write_to_stream(output)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user