Skip to content

Commit

Permalink
A fallback for #474
Browse files Browse the repository at this point in the history
  • Loading branch information
plk committed Sep 21, 2024
1 parent f9600df commit 4da3565
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/Biber/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use Log::Log4perl::Appender::Screen;
use Log::Log4perl::Appender::File;
use Log::Log4perl::Layout::SimpleLayout;
use Log::Log4perl::Layout::PatternLayout;
use Unicode::Normalize qw(normalize NFC NFD checkNFC);
use Unicode::Normalize qw(normalize NFC NFD checkNFC checkNFD);
use parent qw(Class::Accessor);
__PACKAGE__->follow_best_practice;

Expand Down Expand Up @@ -183,9 +183,18 @@ sub _initopts {
# same format
if (checkNFC($ARGV[0])) {
Biber::Config->setoption('UFORM', 'NFC');
} else {
}
elsif (checkNFC($ARGV[0])) {
Biber::Config->setoption('UFORM', 'NFD');
}
else { # Mixed NFC/NFD so set it platform dependent
if ($^O =~ /(?:Mac|darwin)/) {
Biber::Config->setoption('UFORM', 'NFD');
}
else {
Biber::Config->setoption('UFORM', 'NFC');
}
}

# Record the $ARGV[0] name for future use
if (Biber::Config->getoption('tool')) {
Expand Down

0 comments on commit 4da3565

Please sign in to comment.