More fixes for non-ASCII paths on Windows

This commit is contained in:
Alessandro Ranellucci 2016-08-28 11:41:00 +02:00
parent 66e48e9d22
commit ade661ebf1
3 changed files with 11 additions and 4 deletions

View File

@ -89,10 +89,17 @@ sub load {
# legacy syntax of load()
my $config = $class->new;
$config->_load($file);
$config->_load(Slic3r::encode_path($file));
return $config;
}
sub save {
my $self = shift;
my ($file) = @_;
return $self->_save(Slic3r::encode_path($file));
}
sub load_ini_hash {
my $class = shift;
my ($ini_hash) = @_;

View File

@ -39,7 +39,7 @@
%name{setenv} void setenv_();
double min_object_distance();
%name{_load} void load(std::string file);
void save(std::string file);
%name{_save} void save(std::string file);
};
%name{Slic3r::Config::Static} class StaticPrintConfig {
@ -87,7 +87,7 @@
%name{setenv} void setenv_();
double min_object_distance();
%name{_load} void load(std::string file);
void save(std::string file);
%name{_save} void save(std::string file);
};
%package{Slic3r::Config};

View File

@ -254,7 +254,7 @@ INPUT
T_STD_STRING
{
size_t len;
const char * c = SvPVutf8($arg, len);
const char * c = SvPV($arg, len);
$var = std::string(c, len);
}