Wide character at /opt/pkg/lib/perl5/vendor_perl/5.38.0/IkiWiki/Plugin/git.pm line 395

using Ikiwiki setup file /Users/gt/website.setup ...
rebuilding Ikiwiki instance...
generating wrappers..
rebuilding wiki..
Wide character at /opt/pkg/lib/perl5/vendor_perl/5.38.0/IkiWiki/Plugin/git.pm line 395.
rebuilding calendar for diary/*
$ ikiwiki --version
ikiwiki version 3.20200202.3

At the line 395 of the git.pm file, there is the following function:

sub decode_git_file ($$) {
    my $dir=shift;
    my $file=shift;

    # git does not output utf-8 filenames, but instead
    # double-quotes them with the utf-8 characters
    # escaped as \nnn\nnn.
    if ($file =~ m/^"(.*)"$/) {
        ($file=$1) =~ s/\\([0-7]{1,3})/chr(oct($1))/eg;

    # strip prefix if in a subdir
    if (! defined $prefix_cache{$dir}) {
        ($prefix_cache{$dir}) = run_or_die_in($dir, 'git', 'rev-parse', '--show-prefix');
        if (! defined $prefix_cache{$dir}) {
    $file =~ s/^\Q$prefix_cache{$dir}\E//;

    return decode("utf8", $file);

Any idea how to fix the issue? My site uses CJK characters in file names and Git commit messages. Would it be OK?

Are the CJK characters you are using Unicode characters? Would you be able to share some of the recent git commit messages, or the filenames of recently added or modified files (aiming to select the ones that are most likely to have triggered this bug)? That would be a big help in debugging this. Thanks Jon, 2024-03-04