Each character with accent si replaced by a black losange with ? included.
V1.5.2
in Mageia cauldron (target 6).
It is also the case with 1.2.5 in Mageia 5.
diff --git a/bin/gscan2pdf b/bin/gscan2pdfindex 25bafbd..dd99d53 100755--- a/bin/gscan2pdf+++ b/bin/gscan2pdf@@ -118,6 +118,7 @@ my $border = 1;# Set up domain for gettext (internationalisation)
# Expects /usr/share/locale/LANGUAGE/LC_MESSAGES/$prog_name.mo
# or whatever is set by $d->dir([NEWDIR]);
+Locale::gettext::bind_textdomain_codeset($prog_name, 'UTF-8');my $d = Locale::gettext->domain($prog_name);
my $d_sane = Locale::gettext->domain('sane-backends');
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I remove this patch so gscan2pdf displays properly accented characters but we can't remove this patch as we need it for some other packages like "urpmi".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for finding the source of the problem. It sounds as though the patch in perl-Locale-gettext should be removed, and the problem fixed in urpmi.
As a final attempt, how about this patch? Please also try spelling utf-8 in lower case.
diff --git a/bin/gscan2pdf b/bin/gscan2pdfindex 25bafbd..0c328b6 100755--- a/bin/gscan2pdf+++ b/bin/gscan2pdf@@ -118,8 +118,10 @@ my $border = 1;# Set up domain for gettext (internationalisation)
# Expects /usr/share/locale/LANGUAGE/LC_MESSAGES/$prog_name.mo
# or whatever is set by $d->dir([NEWDIR]);
+Locale::gettext::bind_textdomain_codeset($prog_name, 'UTF-8');my $d = Locale::gettext->domain($prog_name);
my $d_sane = Locale::gettext->domain('sane-backends');
+$d->codeset('UTF-8');my $debug = FALSE;
my $EMPTY = q{};
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
$ gscan2pdf
Gtk-Message *: (for origin information, set GTK_DEBUG): failed to retrieve property gtk-primary-button-warps-slider' of typegboolean' from rc file value "((GString) 0x4a1c500)" of type `gboolean' at /usr/lib/perl5/vendor_perl/5.22.2/x86_64-linux-thread-multi/Gtk2.pm line 126.
Locale::gettext->codeset: meaningful only for instances created with domain_raw at /usr/lib/perl5/vendor_perl/5.22.2/x86_64-linux-thread-multi/Locale/gettext.pm line 198.
$
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you are going to have to patch this locally, however, as it only a problem with Mageia due to Mageia's local patches to Locale::gettext, and therefore I don't really want this in upstream gscan2pdf (unless somebody can convince me otherwise).
Are either of you responsible for packaging gscan2pdf for Mageia? If not, can you forward the patch to the packager so that he can apply it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note that on my "vanilla" Locale::gettext, this causes problem with messages (e.g. no device found) being doubly encoded, so please test well before releasing it.
Can you post a screenshot demonstrating the problem?
Same issue here.
screenshot attached
This is not a general problem with gscan2pdf, and has always worked for me and most other people.
Which desktop are you using?
Please start gscan2pdf from the command line with the --log=log option, quit and post the log file.
Here the log file
I'm using KDE 4.14
I'm using Plasma 5 (5.8.3).
And here another log file:
There is nothing suspicious in the log files. Are other GTK programs (e.g. GIMP) affected? Wx Windows programs (e.g. Padre)?
Audacity, Gimp, Filezilla are working fine.
The problem must be something to do with encoding of the .po or .mo files. Please post the content of:
The locale directory might be called fr_FR or something similar.
Attached my gscan2pdf.mo file:
That is bit-for-bit identical to the .mo file I just built and tested.
This bug may be related:
https://bugs.mageia.org/show_bug.cgi?id=14541
Does the patch below help?
Unfortunately it doesn't fix this issue :(
The same here :(
I found something in our "perl-Locale-gettext" package:
http://svnweb.mageia.org/packages/cauldron/perl-Locale-gettext/current/SOURCES/gettext-1.05-SvUTF8_on-on-strings-when-bind_textdomain_codeset-utf8.patch?revision=389214&view=markup
If I remove this patch so gscan2pdf displays properly accented characters but we can't remove this patch as we need it for some other packages like "urpmi".
Thanks for finding the source of the problem. It sounds as though the patch in perl-Locale-gettext should be removed, and the problem fixed in urpmi.
As a final attempt, how about this patch? Please also try spelling utf-8 in lower case.
Hmmm! doesn't work too :(
$ gscan2pdf
Gtk-Message *: (for origin information, set GTK_DEBUG): failed to retrieve property
gtk-primary-button-warps-slider' of typegboolean' from rc file value "((GString) 0x4a1c500)" of type `gboolean' at /usr/lib/perl5/vendor_perl/5.22.2/x86_64-linux-thread-multi/Gtk2.pm line 126.Locale::gettext->codeset: meaningful only for instances created with domain_raw at /usr/lib/perl5/vendor_perl/5.22.2/x86_64-linux-thread-multi/Locale/gettext.pm line 198.
$
OK. How about this, then?
Yeah excellent! it work now, good catch.
So I think this could be done also for other files who contains the same "Locale::gettext->domain" strings, I attached a potential file:
Yup. Go ahead and patch all of those, too.
I think you are going to have to patch this locally, however, as it only a problem with Mageia due to Mageia's local patches to Locale::gettext, and therefore I don't really want this in upstream gscan2pdf (unless somebody can convince me otherwise).
Are either of you responsible for packaging gscan2pdf for Mageia? If not, can you forward the patch to the packager so that he can apply it?
Yes I'm the mageia maintainer of gscan2pdf.
How to patch properly the other files? can you create the patch please?
Thanks in advance!
Please try this.
Note that on my "vanilla" Locale::gettext, this causes problem with messages (e.g. no device found) being doubly encoded, so please test well before releasing it.