Subject: | /$indichar/ matches 'äöü' |
Hi,
I found a bug. Here a simple example:
-------- test.conf --------
<section>
name = äöü
</section>
-------- test.pl --------
use strict;
use warnings;
use Config::General;
use Data::Dumper;
my $config = {
Config::General::ParseConfig(
'-ConfigFile' => 'test.conf',
'-SplitPolicy' => 'equalsign',
)
};
print Dumper($config);
Show quoted text
-------- Output --------
$VAR1 = {
'section' => {
'name = ä� => 'ü'
}
};
-------- Affected lines --------
General.pm
742 if (/$indichar/) {
743 ($option,$value) = split /\s*$indichar\s*/, $_, 2; #
separated by heredoc-finding in _open()
744 }
745 else {
746 if ($this->{SplitPolicy} eq 'guess') {
-------- Description --------
SplitPolicy is never checked because /$indichar/ matches the string
'öäü'. It would be joyful if SplitPolicy has a higher priority or to
disable $indichar detection '-Indichar => 0' or something else.
Cheers
Jonny