[Github-comments] [geany] Warnings with new Scintilla (#875)

Jiří Techet notifications at xxxxx
Wed Jan 27 21:35:33 UTC 2016


I actually don't think they come from Scintilla but rather from the file browser plugin (or anything displaying file names) - I see these when some files are in invalid encoding (e.g. locale is using UTF-8 but the file on the disk is in different encoding). 

The trouble is that utils_get_utf8_from_locale() fails to convert the invalid encoding to UTF-8 in which case this function just makes a copy of the original non-UTF-8 string. This string is then passed to Gtk which emits this error (when I was playing with locales I was even able to crash Geany because of this - Gtk expects all the strings it gets are valid UTF-8).

Maybe we should use something similar to g_filename_display_name () instead to make sure the output is always a valid UTF-8 string. The trouble might be this would make the conversion irreversible but with invalid encoding there will be other problems anyway.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/875#issuecomment-175868722
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160127/afc37dcf/attachment.html>


More information about the Github-comments mailing list