mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-02 16:30:38 +08:00
Decode Special Characters in Path
fixes umlauts in path of file which caused errors when reading the file
This commit is contained in:
parent
716c018cd4
commit
e6c759056e
@ -9,6 +9,8 @@ use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
|
|||||||
use Cwd qw(abs_path);
|
use Cwd qw(abs_path);
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
|
|
||||||
|
require Encode;
|
||||||
|
|
||||||
# Removes '\n' and '\r\n' from a string.
|
# Removes '\n' and '\r\n' from a string.
|
||||||
sub clean {
|
sub clean {
|
||||||
my $text = shift;
|
my $text = shift;
|
||||||
@ -17,7 +19,7 @@ sub clean {
|
|||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $current_path = abs_path($0);
|
my $current_path = Encode::decode_utf8(abs_path($0));
|
||||||
my $expected_content_types = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
|
my $expected_content_types = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
|
||||||
."<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n"
|
."<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n"
|
||||||
."<Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/>\n"
|
."<Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/>\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user