Open frogonwheels opened 14 years ago
Under win32, I get this warning message
c:\Apps\krig\gitageinit.py:256: GtkWarning: gtk_text_buffer_emit_insert: as sertion `g_utf8_validate (text, len, NULL)' failed
The very simplistic modification of Changing the set_text line to: self.sourcebuffer.set_text(unicode(self.blamed.text,"iso-8859-1")) seems to work under windows for standard files.
I have no real knowledge of python, so choosing the encoding in a more robust way would be an advantage (checking the bom marker - used a lot in windows - would allow distinguishing between utf8, ucs2-le ucs2-be encodings). I'm thinking that a filesystem dependent default would be appropriate (iso-8859-1 or get the system encoding somehow for windows, utf8 otherwise).
Hey, I committed a new version which simply does what you suggested on windows. Unfortunately I don't have a windows machine handy to test on, so I don't know if it actually works. :)
A utf8-validate assertion happens, and the buffer fails to be loaded.