GNOME Bugzilla – Bug 789230
glib-mkenums expects C files to be in UTF-8 encoding
Last modified: 2017-10-23 11:26:15 UTC
This is an invalid assumption, and it makes compiling xfce4 engines impossible, several of their source files have a copyright from Tomas Ögren and are encoded in ISO8859-1. I get: Making all in gtk-3.0 gmake[2]: Entering directory '/usr/pkgobj/x11/xfce4-gtk2-engine/work/gtk-xfce-en gine-3.2.0/gtk-3.0' Traceback (most recent call last):
+ Trace 238081
Traceback (most recent call last):
process_file(fname)
line = curfile.readline()
(result, consumed) = self._buffer_decode(data, self.errors, final) (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd6 in position 980: invalid continuation byte Makefile:737: recipe for target 'xfce_typebuiltin.h' failed
This is a duplicate of bug #788283. Re-encode the files as UTF-8. GLib and GTK+ expect basically all string literals to be encoded in UTF-8 anyway. We should mention this in the documentation for glib-mkenums and glib-genmarshal though. Patches welcome.
Actually, there’s some work ongoing to replace invalid encodings with `?` when decoding, and to warn rather than failing. See https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20 onwards. *** This bug has been marked as a duplicate of bug 785113 ***