After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787685 - Invalid source code file encoding
Invalid source code file encoding
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: general
5.2.x
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
: 788283 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-14 16:21 UTC by Jan Tojnar
Modified: 2018-02-12 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix encoding of copyright headers (17.62 KB, patch)
2017-09-14 16:25 UTC, Jan Tojnar
none Details | Review
Patch for libgda 5.24 (14.14 KB, patch)
2017-09-14 19:11 UTC, Jan Tojnar
none Details | Review
Patch for libgda 5.24 (19.01 KB, patch)
2017-09-14 19:33 UTC, Jan Tojnar
none Details | Review
Patch for libgda 5.24 (47.86 KB, patch)
2017-09-16 20:27 UTC, Jan Tojnar
committed Details | Review
Fix encoding of copyright headers (42.06 KB, patch)
2017-09-16 20:34 UTC, Jan Tojnar
none Details | Review
Minimal patch to get gtk-doc-enabled build work (8.71 KB, patch)
2017-12-24 08:55 UTC, Ting-Wei Lan
committed Details | Review
patch to build with --enable-gtk-doc (1.53 KB, patch)
2017-12-24 09:30 UTC, Andrea Zagli
committed Details | Review
Patch for master (20.94 KB, patch)
2017-12-24 09:49 UTC, Jan Tojnar
committed Details | Review
Fix encoding of copyright headers (3.05 KB, patch)
2018-02-12 01:20 UTC, Jan Tojnar
committed Details | Review

Description Jan Tojnar 2017-09-14 16:21:53 UTC
Some older files contain names in the copyright headers written in ISO-8859-1 instead of UTF-8. This breaks with the new glib-mkenums which expects a valid UTF-8 file.
Comment 1 Jan Tojnar 2017-09-14 16:25:02 UTC
Created attachment 359805 [details] [review]
Fix encoding of copyright headers

Some older files contain names in the copyright headers written in
ISO-8859-1 instead of UTF-8. This breaks with the new glib-mkenums
which expects a valid UTF-8 file.
Comment 2 Jan Tojnar 2017-09-14 19:11:31 UTC
Created attachment 359810 [details] [review]
Patch for libgda 5.24
Comment 3 Jan Tojnar 2017-09-14 19:33:50 UTC
Created attachment 359817 [details] [review]
Patch for libgda 5.24
Comment 4 Jan Tojnar 2017-09-14 19:40:12 UTC
Validity can be inspected using the following command:

    find . -name '*.h' -o -name '*.c' -exec isutf8 \{\} \;

isutf8 is part of moreutils.
Comment 5 Jan Tojnar 2017-09-16 20:27:42 UTC
Created attachment 359901 [details] [review]
Patch for libgda 5.24
Comment 6 Jan Tojnar 2017-09-16 20:34:52 UTC
Created attachment 359902 [details] [review]
Fix encoding of copyright headers
Comment 7 Philip Withnall 2017-12-23 09:53:37 UTC
*** Bug 788283 has been marked as a duplicate of this bug. ***
Comment 8 Philip Withnall 2017-12-23 09:54:49 UTC
A script for converting files is available on bug #788283.
Comment 9 Andrea Zagli 2017-12-23 10:14:50 UTC
on current libgda_5.2 attachment 359901 [details] [review] works; attachment 359902 [details] [review] fails

maybe is attachment 359902 [details] [review] for master?
Comment 10 Jan Tojnar 2017-12-23 11:57:52 UTC
(In reply to Andrea Zagli from comment #9)
> on current libgda_5.2 attachment 359901 [details] [review] [review] works; attachment
> 359902 [details] [review] fails
> 
> maybe is attachment 359902 [details] [review] [review] for master?

Yes, attachment 359902 [details] [review] is for master.
Comment 11 Jan Tojnar 2017-12-23 12:02:31 UTC
Note that some files contain names both in UTF-8 and ISO Latin 1. These patches manually fix all these mixed instances.
Comment 12 Jan Tojnar 2017-12-23 12:05:42 UTC
12429af2c0a40bb199ced605b7f7fab5ecc77e86 by Murray Cumming which attempts to fix this on master is incorrect as it breaks some UTF-8 names in the mixed files.
Comment 13 Ting-Wei Lan 2017-12-24 08:55:44 UTC
Created attachment 365917 [details] [review]
Minimal patch to get gtk-doc-enabled build work

Unfortunately, attachment 359902 [details] [review] no longer applies. This is not a proposed patch but a minimal patch to save time of people who want to build libgda with gtk-doc enabled
Comment 14 Andrea Zagli 2017-12-24 09:26:59 UTC
is attachment 365917 [details] [review] for master? if so, i think is better that you open another bug for master
Comment 15 Andrea Zagli 2017-12-24 09:30:56 UTC
Created attachment 365918 [details] [review]
patch to build with --enable-gtk-doc

patch if you want to build with --enable-gtk-doc; must be applied after attachment 359901 [details] [review]
Comment 16 Ting-Wei Lan 2017-12-24 09:32:48 UTC
(In reply to Andrea Zagli from comment #14)
> is attachment 365917 [details] [review] [review] for master? if so, i think is better
> that you open another bug for master

Yes, it is for master. I found there are discussion on patch for master, so I attached it here.
Comment 17 Jan Tojnar 2017-12-24 09:49:36 UTC
Created attachment 365921 [details] [review]
Patch for master
Comment 18 Jan Tojnar 2017-12-24 09:50:28 UTC
I updated my original patch to apply cleanly on master.
Comment 19 Jan Tojnar 2018-02-12 01:20:24 UTC
Created attachment 368240 [details] [review]
Fix encoding of copyright headers

Some names were still not fixed, this should do it.
Comment 20 Jeremy Bicha 2018-02-12 13:57:51 UTC
Attachment 368240 [details] pushed as 1046e8f - Fix encoding of copyright headers