mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-28 15:45:30 +00:00
Fixed "Slic3r crashes when sending STLs with special characters to the printer"
https://github.com/prusa3d/Slic3r/issues/597 The "Send to OctoPrint" function will now send the file name encoded in UTF-8, so the file name will not get mangled. The C++ Slic3r::encode_path() function was returning a string to Perl, which was marked as UTF-8. This has been fixed, now encode_path() returns a plain Perl string. Added path_to_filename, path_to_stem, path_to_extension, path_to_parent_path Perl wrappers to boost::filesystem::path splitting functionality to be able to split UTF-8 encoded files on Windows correctly.
This commit is contained in:
@@ -91,7 +91,7 @@ data_dir()
|
||||
RETVAL = const_cast<char*>(Slic3r::data_dir().c_str());
|
||||
OUTPUT: RETVAL
|
||||
|
||||
std::string
|
||||
local_encoded_string
|
||||
encode_path(src)
|
||||
const char *src;
|
||||
CODE:
|
||||
@@ -112,6 +112,34 @@ normalize_utf8_nfc(src)
|
||||
RETVAL = Slic3r::normalize_utf8_nfc(src);
|
||||
OUTPUT: RETVAL
|
||||
|
||||
std::string
|
||||
path_to_filename(src)
|
||||
const char *src;
|
||||
CODE:
|
||||
RETVAL = Slic3r::PerlUtils::path_to_filename(src);
|
||||
OUTPUT: RETVAL
|
||||
|
||||
std::string
|
||||
path_to_stem(src)
|
||||
const char *src;
|
||||
CODE:
|
||||
RETVAL = Slic3r::PerlUtils::path_to_stem(src);
|
||||
OUTPUT: RETVAL
|
||||
|
||||
std::string
|
||||
path_to_extension(src)
|
||||
const char *src;
|
||||
CODE:
|
||||
RETVAL = Slic3r::PerlUtils::path_to_extension(src);
|
||||
OUTPUT: RETVAL
|
||||
|
||||
std::string
|
||||
path_to_parent_path(src)
|
||||
const char *src;
|
||||
CODE:
|
||||
RETVAL = Slic3r::PerlUtils::path_to_parent_path(src);
|
||||
OUTPUT: RETVAL
|
||||
|
||||
void
|
||||
xspp_test_croak_hangs_on_strawberry()
|
||||
CODE:
|
||||
|
||||
Reference in New Issue
Block a user