Menu

#230 Accentued characters are replaced with ? in French interface

v1.0_(example)
closed-fixed
nobody
None
5
2016-11-23
2016-08-28
papoteur
No

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.

Discussion

1 2 > >> (Page 1 of 2)
  • Jeffrey Ratcliffe

    Can you post a screenshot demonstrating the problem?

     
  • Geiger David

    Geiger David - 2016-10-31

    Same issue here.

    screenshot attached

     
  • Jeffrey Ratcliffe

    This is not a general problem with gscan2pdf, and has always worked for me and most other people.

     
  • Jeffrey Ratcliffe

    Which desktop are you using?

     
  • Jeffrey Ratcliffe

    Please start gscan2pdf from the command line with the --log=log option, quit and post the log file.

     
  • papoteur

    papoteur - 2016-11-03

    Here the log file

     
  • papoteur

    papoteur - 2016-11-03

    I'm using KDE 4.14

     
  • Geiger David

    Geiger David - 2016-11-03

    I'm using Plasma 5 (5.8.3).

    And here another log file:

     
  • Jeffrey Ratcliffe

    There is nothing suspicious in the log files. Are other GTK programs (e.g. GIMP) affected? Wx Windows programs (e.g. Padre)?

     
  • papoteur

    papoteur - 2016-11-04

    Audacity, Gimp, Filezilla are working fine.

     
  • Jeffrey Ratcliffe

    The problem must be something to do with encoding of the .po or .mo files. Please post the content of:

    /usr/share/locale/fr/LC_MESSAGES/gscan2pdf.mo
    

    The locale directory might be called fr_FR or something similar.

     
  • Geiger David

    Geiger David - 2016-11-09

    Attached my gscan2pdf.mo file:

     
  • Jeffrey Ratcliffe

    That is bit-for-bit identical to the .mo file I just built and tested.

     
  • Jeffrey Ratcliffe

    This bug may be related:

    https://bugs.mageia.org/show_bug.cgi?id=14541

    Does the patch below help?

    diff --git a/bin/gscan2pdf b/bin/gscan2pdf
    index 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');
    
     
  • Geiger David

    Geiger David - 2016-11-10

    Unfortunately it doesn't fix this issue :(

     
  • papoteur

    papoteur - 2016-11-10

    The same here :(

     
  • Jeffrey Ratcliffe

    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/gscan2pdf
    index 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{};
    
     
  • Geiger David

    Geiger David - 2016-11-11

    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.
    $

     
  • Jeffrey Ratcliffe

    OK. How about this, then?

    diff --git a/bin/gscan2pdf b/bin/gscan2pdf
    index 25bafbd..3458628 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]);
    -my $d      = Locale::gettext->domain($prog_name);
    -my $d_sane = Locale::gettext->domain('sane-backends');
    +Locale::gettext::bind_textdomain_codeset($prog_name, 'UTF-8');
    +my $d      = Locale::gettext->domain_raw($prog_name);
    +my $d_sane = Locale::gettext->domain_raw('sane-backends');
    +$d->codeset('UTF-8');
    
     my $debug   = FALSE;
     my $EMPTY   = q{};
    
     
  • Geiger David

    Geiger David - 2016-11-14

    Yeah excellent! it work now, good catch.

     
  • Geiger David

    Geiger David - 2016-11-14

    So I think this could be done also for other files who contains the same "Locale::gettext->domain​" strings, I attached a potential file:

     
  • Jeffrey Ratcliffe

    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?

     
  • Geiger David

    Geiger David - 2016-11-15

    Yes I'm the mageia maintainer of gscan2pdf.

    How to patch properly the other files? can you create the patch please?

    Thanks in advance!

     
  • Jeffrey Ratcliffe

    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.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.