Skip to content

Commit

Permalink
Item13405: NFC normalize bootstrapped paths
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Dec 23, 2015
1 parent 571a359 commit 1db9068
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/lib/Foswiki/Configure/Load.pm
Expand Up @@ -22,6 +22,7 @@ use Encode;
use File::Basename;
use File::Spec;
use POSIX qw(locale_h);
use Unicode::Normalize;

use Foswiki::Configure::FileUtil;

Expand Down Expand Up @@ -415,7 +416,7 @@ sub bootstrapConfig {

# Can't use Foswiki::decode_utf8 - this is too early in initialization
print STDERR "AUTOCONFIG: Found Bin dir: "
. Encode::decode_utf8($bin)
. NFC( Encode::decode_utf8($bin) )
. ", Script name: $script using FindBin\n"
if (TRAUTO);

Expand Down Expand Up @@ -462,7 +463,7 @@ sub bootstrapConfig {
# Need to decode utf8 back to perl characters. The file path operations
# all worked with bytes, but Foswiki needs characters.
# Can't use Foswiki::decode_utf8 - this is too early in initialization
$Foswiki::cfg{$key} = Encode::decode_utf8( $Foswiki::cfg{$key} );
$Foswiki::cfg{$key} = NFC( Encode::decode_utf8( $Foswiki::cfg{$key} ) );

print STDERR "AUTOCONFIG: $key = $Foswiki::cfg{$key} \n"
if (TRAUTO);
Expand Down

0 comments on commit 1db9068

Please sign in to comment.