def force_decode(self, text): try: text = text.decode('utf-8') except UnicodeDecodeError: if sublime.platform() == "windows": text = self.decode_windows_line(text) return text