Menu

#53 Accented characters not being displayed

v1.0 (example)
closed-fixed
None
5
2024-05-23
2024-04-09
No

Hi!

I just discovered that nice little utility for managing my passwords!

I noticed that many characters from the french language are not being displayed like é, è, à, etc.

See below:

Provide the master password: ***********************

KeePass CLI (kpcli) v4.0 is ready for operation.
Type 'help' for a description of available commands.
Type 'help <command>' for details on individual commands.

kpcli:/Root> ls
=== Groups ===
Cl�s de licence/
G�n�ral/

The groups should read "Clés de licence/" and "Général/"

I am using Fedora 39 which currently has version 4.0-1.

Discussion

1 2 > >> (Page 1 of 2)
  • Lester Hightower

    • status: open --> pending-remind
     
  • Lester Hightower

    I don't believe that this is a kpcli bug, at least not directly. To support that assertion, you can see kpcli doing the right thing on my Linux Mint desktop:

    $ kpcli
    KeePass CLI (kpcli-DEVELOPMENT) vDEVELOPMENT is ready for operation.
    Type 'help' for a description of available commands.
    Type 'help <command>' for details on individual commands.
    
    kpcli-DEVELOPMENT:/> ls
    === Groups ===
    eMail/
    Internet/
    kpcli-DEVELOPMENT:/> cd Internet/
    kpcli-DEVELOPMENT:/Internet> new "Clés de licence"
    Adding new entry to "/Internet"
    Title: Clés de licence
    Username: 
    Password:                ("g" or "w" to auto-generate, "i" for interactive)
    URL: 
    Notes/Comments (""): 
    (end multi-line input with a single "." on a line)
    | 
    kpcli-DEVELOPMENT:/Internet> ls
    === Entries ===
    
    0. Clés de licence                                                       
    kpcli-DEVELOPMENT:/Internet> mkdir "Général"
    kpcli-DEVELOPMENT:/Internet> ls
    === Groups ===
    Général/
    === Entries ===
    0. Clés de licence                                                       
    kpcli-DEVELOPMENT:/Internet> 
    

    I suspect an issue with utf8 and perl and your terminal. It will likely be difficult to troubleshoot from a distance, but perhaps comparing your installed modules to mine will be helpful (this is a long list, sorry...):

    kpcli-DEVELOPMENT:/Internet> vers -v
    kpcli: DEVELOPMENT
    Perl: v5.34.0
    Operating system: linux ("Linux Mint 21.1 Vera")
    ReadLine being used: Term::ReadLine::Gnu
    
    Pivotal Perl Modules for kpcli
    
     * File::KeePass: 2.03
     * File::KDBX: 0.906
     * Term::ShellUI: 0.92
     * Term::ReadKey: 2.38
     * Term::ReadLine: 1.17
     * Authen::OATH: 2.0.1
     * Capture::Tiny: 0.48
     * Clipboard: 0.27
     * Convert::Base32: 0.06
     * Data::Password: 1.12
     * File::KDBX::Constants: 0.906
     * File::KDBX::Key: 0.906
     * Math::Random::ISAAC: 1.004
     * Sub::Install: 0.928
     * Term::ReadLine::Gnu: 1.42
     * URI: 5.10
     * Data::Password::passwdqc: not installed (optional)
     * Data::Password::zxcvbn: not installed (optional)
    
    All Other Loaded Perl Modules
    
     * attributes: 0.33
     * AutoLoader: 5.74
     * base: 2.27
     * B::Hooks::EndOfScope: 0.25
     * B::Hooks::EndOfScope::XS: 0.25
     * boolean: 0.46
     * B: 1.82
     * bytes: 1.08
     * Carp::Heavy: 1.52
     * Carp: 1.52
     * Class::XSAccessor::Heavy: 1.19
     * Class::XSAccessor: 1.19
     * Clipboard::Xclip: 0.27
     * Clone: 0.45
     * common::sense: 3.75
     * Config: 5.034000
     * constant: 1.33
     * Crypt::Digest: 0.076
     * Crypt::PRNG: 0.076
     * Crypt::Rijndael: 1.16
     * CryptX: 0.076
     * Cwd: 3.80
     * Data::Dumper: 2.179
     * Devel::GlobalDestruction: 0.14
     * diagnostics: 1.37
     * Digest::base: 1.19
     * Digest::file: 1.19
     * Digest::HMAC: 1.04
     * Digest::MD5: 2.58
     * Digest: 1.19
     * Digest::SHA: 6.02
     * DynaLoader: 1.50
     * Encode::Alias: 2.24
     * Encode::Config: 2.05
     * Encode::Encoding: 2.08
     * Encode::MIME::Name: 1.03
     * Encode: 3.16
     * English: 1.11
     * Errno: 1.33
     * Eval::TypeTiny: 1.012004
     * Exporter::Heavy: 5.76
     * Exporter: 5.76
     * Exporter::Tiny: 1.002002
     * Fcntl: 1.14
     * File::Basename: 2.85
     * File::Copy: 2.35
     * FileHandle: 2.03
     * File::KDBX::Error: 0.906
     * File::KDBX::Safe: 0.906
     * File::KDBX::Util: 0.906
     * File::Path: 2.18
     * File::Spec: 3.80
     * File::Spec::Unix: 3.80
     * File::Temp: 0.2311
     * Getopt::Long: 2.52
     * Hash::Util::FieldHash: 1.21
     * integer: 1.01
     * IO::File: 1.46
     * IO::Handle: 1.46
     * IO: 1.46
     * IO::Seekable: 1.46
     * JSON: 4.04
     * JSON::XS: 4.03
     * List::Util: 1.61
     * locale: 1.10
     * Math::BigInt::Calc: 1.999818
     * Math::BigInt::Lib: 1.999818
     * Math::BigInt: 1.999818
     * Math::Random::ISAAC::XS: 1.004
     * Method::Generate::Accessor: unknown
     * Method::Generate::Constructor: unknown
     * MIME::Base64: 3.16
     * Module::Implementation: 0.09
     * Module::Loaded: 0.08
     * Module::Load: 0.36
     * Module::Runtime: 0.016
     * Moo::HandleMoose::_TypeMap: unknown
     * Moo::Object: unknown
     * Moo: 2.005004
     * Moo::sification: unknown
     * Moo::_Utils: unknown
     * mro: 1.25_001
     * namespace::clean: 0.27
     * namespace::clean::_Util: unknown
     * overloading: 0.02
     * overload: 1.33
     * Package::Stash: 0.39
     * Package::Stash::XS: 0.29
     * parent: 0.238
     * PerlIO: 1.11
     * POSIX: 1.97
     * Ref::Util: 0.204
     * Ref::Util::XS: 0.117
     * re: 0.41
     * Scalar::Util: 1.61
     * SelectSaver: 1.02
     * Sort::Naturally: 1.03
     * Storable: 3.23
     * strict: 1.12
     * Sub::Defer: 2.006006
     * Sub::Exporter::Progressive: 0.001013
     * Sub::Quote: 2.006006
     * subs: 1.04
     * Sub::Util: 1.61
     * Symbol: 1.09
     * Term::ANSIColor: 5.01
     * Term::ReadLine::Gnu::XS: 1.42
     * Text::Shellwords::Cursor: 0.81
     * Text::Tabs: 2013.0523
     * Tie::Hash: 1.05
     * Time::HiRes: 1.9767
     * Time::Local: 1.30
     * Time::Piece: 1.3401
     * Time::Seconds: 1.3401
     * Try::Tiny: 0.31
     * Type::Coercion: 1.012004
     * Type::Library: 1.012004
     * Types::Serialiser: 1.01
     * Types::Standard: 1.012004
     * Types::TypeTiny: 1.012004
     * Type::Tiny: 1.012004
     * Type::Tiny::XS: 0.022
     * URI::Escape: 5.10
     * Variable::Magic: 0.62
     * vars: 1.05
     * version: 0.9929
     * version::regex: 0.9929
     * version::vxs: 0.9929
     * warnings: 1.51
     * warnings::register: 1.04
     * XSLoader: 0.30
    

    The Term::ReadLine module used is the first place that I would start, but honestly I don't quite see how that could cause it. There could be some perl default UTF-8 behavior that is compiled differently in Fedora than in Mint...

    I hope this helps. Sorry that I don't have a better answer.

     
    • Patrick Pelletier

      Here are my installed modules, in case that's useful:

      kpcli:/Root> vers -v
      kpcli: 4.0
      Perl: v5.38.2
      Operating system: linux ("Fedora Linux 39 (Workstation Edition)")
      ReadLine being used: Term::ReadLine::Gnu
      
      Pivotal Perl Modules for kpcli
      
       * File::KeePass: 2.03
       * File::KDBX: 0.906
       * Term::ShellUI: 0.92
       * Term::ReadKey: 2.38
       * Term::ReadLine: 1.17
       * Capture::Tiny: 0.48
       * Clipboard: 0.28
       * File::KDBX::Constants: 0.906
       * File::KDBX::Key: 0.906
       * Sub::Install: 0.929
       * Term::ReadLine::Gnu: 1.46
       * URI: 5.21
       * Authen::OATH: not installed (optional)
       * Data::Password: not installed (optional)
       * Data::Password::passwdqc: not installed (optional)
       * Data::Password::zxcvbn: not installed (optional)
       * Math::Random::ISAAC: not installed (optional)
      
      All Other Loaded Perl Modules
      
       * AutoLoader: 5.74
       * base: 2.27
       * B::COW: 0.007
       * B::Hooks::EndOfScope: 0.26
       * B::Hooks::EndOfScope::XS: 0.26
       * boolean: 0.46
       * builtin: 0.008
       * bytes: 1.08
       * Carp::Heavy: 1.54
       * Carp: 1.54
       * Clipboard::Xclip: 0.28
       * Clone: 0.46
       * Compress::Raw::Zlib: 2.206
       * Config: 5.038002
       * constant: 1.33
       * Crypt::Argon2: 0.019
       * Crypt::Cipher: 0.080
       * Crypt::Digest: 0.080
       * Crypt::Mac::HMAC: 0.080
       * Crypt::Mac: 0.080
       * Crypt::Misc: 0.080
       * Crypt::Mode::CBC: 0.080
       * Crypt::Mode::CFB: 0.080
       * Crypt::Mode::ECB: 0.080
       * Crypt::Mode::OFB: 0.080
       * Crypt::PRNG: 0.080
       * Crypt::Rijndael: 1.16
       * Crypt::Stream::ChaCha: 0.080
       * CryptX: 0.080
       * Cwd: 3.89
       * Data::Dumper: 2.188
       * Devel::GlobalDestruction: 0.14
       * diagnostics: 1.39
       * Digest::base: 1.20
       * Digest::file: 1.20
       * Digest::MD5: 2.58
       * Digest: 1.20
       * Digest::SHA: 6.04
       * DynaLoader: 1.54
       * Encode::Alias: 2.25
       * Encode::Config: 2.05
       * Encode::Encoding: 2.08
       * Encode::MIME::Name: 1.03
       * Encode: 3.19
       * English: 1.11
       * Errno: 1.37
       * Exporter::Heavy: 5.77
       * Exporter: 5.77
       * Fcntl: 1.15
       * File::Basename: 2.86
       * File::Copy: 2.41
       * File::GlobMapper: 1.001
       * File::Glob: 1.40
       * FileHandle: 2.05
       * File::KDBX::Cipher::CBC: 0.906
       * File::KDBX::Cipher: 0.906
       * File::KDBX::Cipher::Stream: 0.906
       * File::KDBX::Entry: 0.906
       * File::KDBX::Error: 0.906
       * File::KDBX::Group: 0.906
       * File::KDBX::IO::Crypt: 0.906
       * File::KDBX::IO::HmacBlock: 0.906
       * File::KDBX::IO: 0.906
       * File::KDBX::Iterator: 0.906
       * File::KDBX::KDF::AES: 0.906
       * File::KDBX::KDF::Argon2: 0.906
       * File::KDBX::KDF: 0.906
       * File::KDBX::Key::Composite: 0.906
       * File::KDBX::Key::Password: 0.906
       * File::KDBX::Loader: 0.906
       * File::KDBX::Loader::V4: 0.906
       * File::KDBX::Loader::XML: 0.906
       * File::KDBX::Object: 0.906
       * File::KDBX::Safe: 0.906
       * File::KDBX::Util: 0.906
       * File::Path: 2.18
       * File::Spec: 3.88
       * File::Spec::Unix: 3.88
       * File::Temp: 0.2311
       * Getopt::Long: 2.54
       * Hash::Util::FieldHash: 1.26
       * integer: 1.01
       * IO::Compress::Base::Common: 2.206
       * IO::Compress::Gzip::Constants: 2.206
       * IO::Compress::Zlib::Extra: 2.206
       * IO::File: 1.52
       * IO::Handle: 1.52
       * IO: 1.52
       * IO::Seekable: 1.52
       * IO::Uncompress::Adapter::Inflate: 2.206
       * IO::Uncompress::Base: 2.206
       * IO::Uncompress::Gunzip: 2.206
       * IO::Uncompress::RawInflate: 2.206
       * Iterator::Simple::Iterator: unknown
       * Iterator::Simple: 0.07
       * List::Util: 1.63
       * locale: 1.10
       * Module::Implementation: 0.09
       * Module::Loaded: 0.08
       * Module::Load: 0.36
       * Module::Runtime: 0.016
       * namespace::clean: 0.27
       * namespace::clean::_Util: unknown
       * overloading: 0.02
       * overload: 1.37
       * Package::Stash: 0.40
       * Package::Stash::XS: 0.30
       * parent: 0.241
       * PerlIO: 1.12
       * PerlIO::scalar: 0.31
       * POSIX: 2.13
       * Ref::Util: 0.204
       * Ref::Util::XS: 0.117
       * Scalar::Util: 1.63
       * Scope::Guard: 0.21
       * SelectSaver: 1.02
       * Sort::Naturally: 1.03
       * Storable: 3.32
       * strict: 1.12
       * Sub::Exporter::Progressive: 0.001013
       * subs: 1.04
       * Sub::Util: 1.63
       * Symbol: 1.09
       * Term::ANSIColor: 5.01
       * Term::ReadLine::Gnu::XS: 1.46
       * Text::Shellwords::Cursor: 0.81
       * Text::Tabs: 2023.0511
       * Tie::Hash: 1.06
       * Time::HiRes: 1.9775
       * Time::Local: 1.35
       * Time::Piece: 1.3401_01
       * Time::Seconds: 1.3401
       * Try::Tiny: 0.31
       * URI::Escape: 5.21
       * utf8: 1.25
       * Variable::Magic: 0.63
       * vars: 1.05
       * version: 0.9930
       * version::regex: 0.9930
       * version::vxs: 0.9930
       * warnings: 1.65
       * warnings::register: 1.05
       * XML::LibXML::AttributeHash: 2.0209
       * XML::LibXML::Boolean: 2.0209
       * XML::LibXML::Error: 2.0209
       * XML::LibXML::Literal: 2.0209
       * XML::LibXML::NodeList: 2.0209
       * XML::LibXML::Number: 2.0209
       * XML::LibXML: 2.0209
       * XML::LibXML::Reader: 2.0209
       * XML::LibXML::XPathContext: 2.0209
       * XML::SAX::Exception: 1.09
       * XSLoader: 0.32
      kpcli:/Root> 
      
       
  • Lester Hightower

    It may also be helpful to look at your LANG environment variable setting:

    $ set|egrep '^LANG='
    LANG=en_US.UTF-8
    

    You could also try running kpcli underneath luit, to try to help understand and isolate the problem:

    $ luit -encoding ISO-8859-1 kpcli
    

    If luit solves the problem for you, the the issue is definately in your terminal and/or environment.

     
  • Patrick Pelletier

    Wow, thanks man! running kpcli through luit solved the problem. So I'll add that to my current bash alias for now and eventually try to troubleshoot my terminal and/or environment (for now, my $LANG environment variable is fr_CA.UTF-8 which seems to make sense since I'm a French-Canadian).

    Sorry I'm a little new to bug reporting (and I'm not a developer) so I'm not sure if I should open a new ticket here or with the perl-Clipboard developper for the following:

    I noticed that the copy to clipboard commands (xp, xu, xw, etc.) don't work. I have perl-Capture-Tiny and perl-Clipboard installed. I saw that perl-Clipboard required xclip as a dependency. xclip does not work on Wayland (I'm using Fedora 39 with Gnome 45.5). The equivalent of xclip under Wayland would be wl-copy from the wl-clipboard package.

    Thank you!

     
    • Lester Hightower

      Patrick - The Perl Clipboard module is under active development. The most recent Changelog entry is from just 3 days ago: https://metacpan.org/dist/Clipboard/changes

      As such, there is a good change that the author, Ryan King rking@panoptic.com, would consider adding support for Wayland.

      The code is hosted on GitHub and you could open an issue here: https://github.com/shlomif/Clipboard/issues

      Today, and by looking at the source code, it does appear that Wayland is not supported: https://metacpan.org/release/SHLOMIF/Clipboard-0.29/source/lib/Clipboard.pm

          my %drivers = (
              # list stolen from Module::Build, with some modifications (for
              # example, cygwin doesn't count as Unix here, because it will
              # use the Win32 clipboard.)
              bind_os(Xsel => qw(linux bsd$ aix bsdos dec_osf dgux
                  dynixptx gnu hpux irix dragonfly machten next os2 sco_sv solaris
                  sunos svr4 svr5 unicos unicosmk)),
              bind_os(Xclip => qw(linux bsd$ aix bsdos dec_osf dgux
                  dynixptx gnu hpux irix dragonfly machten next os2 sco_sv solaris
                  sunos svr4 svr5 unicos unicosmk)),
              bind_os(MacPasteboard => qw(darwin)),
          );
      

      However, given the nice code organization of this module, with support for both Xsel and Xclip, adding a driver for wl-clipboard would probably not be very difficult. Heck, I'd even be willing to pitch in and help Ryan if needed, although I don't have anything running Wayland.

       

      Last edit: Lester Hightower 2024-04-10
    • Lester Hightower

      I went ahead and opened an issue: https://github.com/shlomif/Clipboard/issues/13

       
    • Lester Hightower

      I setup a Fedora-39 environment in which to code wl-clipboard support into Clipboard, and after getting that done it all appears to be unecessary. Instead, I just installed xclip and it worked...

      $ cat ./cbtest.pl 
      #!/usr/bin/perl
      
      use strict;
      use Clipboard; # from perl-Clipboard
      system("cat /etc/os-release | grep -E '^PRETTY_N'");
      system("set | grep -E 'DISPLAY='");
      my $cpval = 'foo';
      Clipboard->copy("$cpval\n");
      print "Pasting '$cpval' here: ". Clipboard->paste;
      exit;
      

      And then running that in Fedora 39 under Wayland:

      $ ./cbtest.pl
      PRETTY_NAME="Fedora Linux 39 (Workstation Edition)"
      BASH_EXECUTION_STRING='set | grep -E '\''DISPLAY='\'''
      DISPLAY=:0
      GNOME_SETUP_DISPLAY=:1
      WAYLAND_DISPLAY=wayland-0
      Pasting 'foo' here: foo
      

      I therefore don't know how to replicate the clipboard problem that you reported. It seems that there isn't one, other than perhaps you needing to install xclip...?

       
      • Patrick Pelletier

        I do have xclip installed (it was installed as a dependency for perl-Clipboard).

        patrick@thinkpad:~$ which xclip
        /usr/bin/xclip
        patrick@thinkpad:~$ echo test | xclip # (does not work)
        patrick@thinkpad:~$ echo test | wl-copy # (that works)
        

        And it looks like xclip is not supposed to be working on Wayland:

        xclip on wayland - Google Search

        Does not work with wayland · Issue #62 · astrand/xclip · GitHub

        Is it possible that your Fedora 39 environment is running under Xwayland?

         
        • Lester Hightower

          Hi Patrick -

          Yesterday was the first time that I ever touched Fedora 39 or Wayland. I am not 100% sure how to answer your question about XWayland, but on the login screen I am using the "GNOME" option, not either of the two that end with "... on Xorg" (see attached) which I believed means Wayland... How can I know for sure?

           
        • Lester Hightower

          This leads me to believe that the Fedora-39 osboxes.org VM that I grabbed yesterday is indeed setup to use Xwayland, which would explain why xclip works:

          hightowe@fedora:~$ ps auxwww|grep -i -- xwayland
          hightowe    2338  0.0  0.9 192072 18296 ?        S    09:20   0:00 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1000/.mutter-Xwaylandauth.6UC8L2 -listenfd 4 -listenfd 5 -displayfd 6 -initfd 7 -byteswappedclients
          hightowe    3163  0.0  0.1 222432  2304 pts/0    S+   09:36   0:00 grep --color=auto -i -- xwayland
          
          hightowe@fedora:~$ dnf list installed|grep -i xwayland
          xisxwayland.x86_64                                   2-3.fc39                            @anaconda
          xorg-x11-server-Xwayland.x86_64                      23.2.1-1.fc39                       @anaconda
          

          I am not sure how to change that (probably will go Google it now) and am also unsure what sort of castrophe it may cause for integration with VirtualBox.

           
          • Lester Hightower

            Googling did not help me much... I do believe that I figured out how to stop XWayland from loading, but when I instituted it the GNOME desktop would then not start at all.

            What I did is found here: https://www.reddit.com/r/gnome/comments/xa18en/how_to_disable_xwayland_completely/

            I edited via "systemctl --user edit org.gnome.Shell@wayland.service" and added:

            [Service]
            ExecStart=/usr/bin/gnome-shell --no-x11

            which I believe worked to stop XWayland from loading, but then the user cannot get to a working GNOME desktop, and so I was forced to roll it back.

             
            • Lester Hightower

              Despite not being able to disable XWayland, I was able to add wl-clipboard suport to Clipboard. I re-opend the related issue and submitted a pull request:

               
              • Patrick Pelletier

                Hey thanks a lot man! I think that will be helpful for many people as most desktops are gradually moving to Wayland, including Linux Mint that recently started an experimental Wayland session ;)

                 
  • Patrick Pelletier

    Damn! It looks like running kpcli through luit did NOT solved the problem. I accidentally ran keepassxc-cli through another alias and thought it was kpcli... Anyway, thank you very much for you time, I'll try troubleshoot my environment or terminal later on.

     
    • Lester Hightower

      After a little more research, I am curious to know if the issue that you reported exists only on entries created in another program (like keepassxc) or if it also appears on entries that you create in kpcli? If it's the former only, then it may be that the character encoding that was used for adding the entries does not match what your terminal is using. https://github.com/keepassxreboot/keepassxc/issues/2413

       
      • Patrick Pelletier

        Yes, it looks like there is a difference between data added by KeePassXC and data added by kpcli. I made some tests and here are the results.

        Entries made with KeePassXC

        When I use kpcli to access my real password database that was entirely created with KeePassXC, I get the following behaviour:

        • If I type ls to list groups, any accented character in group names is replaced with "�" and I can only cd into a group that does not have accented characters.
        • When running ls to list entries in a group, all titles are displayed correctly included their accented characters.
        • However, if I try to run show to see the details of an entry containing accented characters, kpcli return no output.
        • For an entry that doesn't have accented characters in its title, the show command works but the notes field displays a "�" for each accented character.

        Entries made with kpcli

        To test entries created with kpcli, I created a test.kdbx database with kpcli and never let KeePassXC touch it. The results are better overall but stil a few problems:

        • I never get any "�" and accented character are displayed correctly most of the time, except for what follows.
        • If I tab to autocomplete, accented characters get replaced by a pair of other special characters as soon as I hit tab. For example: "Université" gets replaced by "Université" and "Français" gets replaced by "Français". That makes tab to autocomplete unusable for anything with accented characters.
        • If I cd into a group that contains an accented character in its name, the prompt displays the group name with the same kind of character replacement as with autocomplete. Example: kpcli:/Root/Collège> instead of kpcli:/Root/Collège>.
         
        • Lester Hightower

          From this, I suspect that you may have found multiple problems...

          Let me start with just one possible one and that is that the LANG setting that KeePassXC is pickup up from your system-wide settings differs from that given in your terminal that kpcli is given. That could happen if you are changing your LANG in your ~/.bashrc, for example.

          Do these values all match for you?

          hightowe@fedora:~$ cat /etc/locale.conf 
          LANG="en_US.UTF-8"
          hightowe@fedora:~$ set|grep LANG=
          GDM_LANG=en_US.UTF-8
          LANG=en_US.UTF-8
          

          Related, if you launch KeePassXC from a terminal, does the behavior differ?

          The matter of character encoding here is fairly complex because of all of the layers involved. In your GUI environment, there is Wayland, Gnome/GTK, and then finally Qt, because KeePassXC is written with the Qt GUI toolkit (ala. KDE).

           
          • Patrick Pelletier

            Hi Lester,

            As for my ~.bashrc, I checked and did a few searches in it (LANG, utf, etc.) and found nothing that seems to change my LANG. I also tried to disable all the default things that Fedora puts in it (since there is some stuff in there that I can't quite understand) and it didn't solve the problem.

            As for my LANG values, they seem to match:

            patrick@thinkpad-l580:~$ cat /etc/locale.conf
            LANG="fr_CA.UTF-8"
            patrick@thinkpad-l580:~$ set|grep LANG=
            GDM_LANG=fr_CA.UTF-8
            LANG=fr_CA.UTF-8
            

            KeePassXC behaves the same whether I open it from Gnome or from gnome-terminal.

            I also tried using kpcli in a tty with Ctrl+Alt+F3 (therefore completely bypassing Gnome if my understanding is correct) and it did not solve the problem.

            I also tried to open my database with KeePassXC on Windows and everything is ok.

            I tried to add an entry with a bunch of accented characters with kpcli to my real password database (which was entirely made with KeePassXC). That entry is then not displayed correctly in kpcli but is displayed correctly in KeePassXC.

            It looks like my list of installed modules includes a utf8 module, utf8: 1.25, which does not appear in your list. I know nothing about perl modules so I'm just guessing at this point...

             
            • Lester Hightower

              Because I am unable to replicate the problem. could you create and provide a file that I can use to test with?

               
  • Lester Hightower

    • status: pending-remind --> closed-invalid
     
  • Lester Hightower

    Patrick - I discovered a couple of things that I want to share.

    Have a look at this:

    kpcli:/> newdb
    Choose your file format:
    
    
     1. KDB   - The original KeePass format (*.kdb).
                Supported using File::KeePass
     2. KDBX3 - The first KeePass XML format (*.kdbx v3).
                Supported using File::KeePass
     3. KDBX4 - The second KeePass XML format (*.kdbx v4).
                Supported using File::KDBX
    Choose: (1)/(2)/(3)/(c)ancel? 3
    Done. Use the saveas command to write to disk.
    kpcli:/Root> mkdir Clés\ de\ licence
    kpcli:/Root> ls
    === Groups ===
    Clés de licence/
    kpcli:/Root> new "Clés entry"
    Adding new entry to "/Root"
    Title: Clés entry
    [...snipped for brevity...]
    kpcli:/Root> ls
    === Groups ===
    Clés de licence/
    === Entries ===
    0. Clés entry                                                            
    kpcli:/Root> saveas ./test.kdbx
    Provide the master password: *************************
    Retype to verify: *************************
    You are now operating on a KDBX v4.1 file: ./test.kdbx
    kpcli:/Root> ls
    === Groups ===
    Cls de licence/
    === Entries ===
    0. Cls entry                                                         kpcli:/Root> 
    

    Take note that the "saveas" command first saves and then loads the file.

    Now, check this out:

    kpcli:/> newdb
    Choose your file format:
    
    
     1. KDB   - The original KeePass format (*.kdb).
                Supported using File::KeePass
     2. KDBX3 - The first KeePass XML format (*.kdbx v3).
                Supported using File::KeePass
     3. KDBX4 - The second KeePass XML format (*.kdbx v4).
                Supported using File::KDBX
    Choose: (1)/(2)/(3)/(c)ancel? 2
    Done. Use the saveas command to write to disk.
    kpcli:/> mkdir Clés\ de\ licence
    kpcli:/> ls
    === Groups ===
    eMail/
    Internet/
    Clés de licence/
    kpcli:/> new Clés\ de\ licence/Clés\ entry
    Adding new entry to "/Clés de licence"
    [...snipped for brevity...]
    kpcli:/> saveas test2.kdbx
    Provide the master password: *************************
    Retype to verify: *************************
    You are now operating on a KDBX v3.0 file: test2.kdbx
    kpcli:/> ls
    === Groups ===
    eMail/
    Internet/
    Clés de licence/
    kpcli:/> 
    

    In the second case (KDBXv3) the file is saved and loaded with File::KeePass. In the first case (KDBXv4), it is saved and loaded with File::KDBX.

    No good answers, but at least I think that I have a place to look now. The author of File::KDBX is a great guy who has been responsive to me in the past. I may ask him his thoughts as he may have dealt with this prior and save me a ton of time.

    And FYI, the tab completion and path prompt problem happens in both cases after the files are loaded, but it does not occur on new entries that are not saved. And so, I think there may be some character encoding/decoding problems happening on load in both cases, but perhaps it is less severe in the case of File::KeePass, but I am not sure yet.

     
    • Patrick Pelletier

      Nice! I'm happy to see that the problem is getting more and more isolated. Since you were able to replicate the problem, I assume that you don't need me to provide a test file anymore but if you need anything, just give me a sign.

      I'm not used to contributing bug reports... I thought it was very interesting and you are definitely very dedicated to your project. Honestly, I was a little worried about waisting your time in the event it would have turned out to be my computer's problem.

      And since both clipboard and accented characters issues seem to be coming from dependencies, I hope that all of this will benefit other projects as well.

      Anyway, have a great rest of you day and do not hesitate if you need any other feedback!

       
      • Lester Hightower

        Patrick - Charles (the author of File::KDBX) was quick to respond and he provded some great information. Things are not 100% working yet, but they are much improved.

        If it's not too much trouble, would you please make and send a small testable kdbx file, made in your environment with KeePassXC? I want to be sure that your files, from your locale, also test well. All of my files are all built in the en_US.UTF-8 locale.

        Just make a small file that has a few groups and entries with names and values that include characters that you're having trouble with, give it a trivial password like "test" or something, and attach the file to a reply here.

        Thanks.

         
        • Patrick Pelletier

          Hi Lester,

          Is a test file in KDBX4 format made with KeePassXC.

          The password is "test"

          I tried to include a lot of diversity of French characters and left a few names without them in case the problem persists and you need to show or cd into something.

          Let me know if you need anything else.

           
1 2 > >> (Page 1 of 2)

Log in to post a comment.

MongoDB Logo MongoDB