From 48ba7e5f73d07725ca49585f33fa86893a905448 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 21 Dec 2017 20:11:19 +0100 Subject: [PATCH] Removed dependency on Perl Encode::encode_utf8. --- lib/Slic3r/GUI/Plater.pm | 2 +- xs/xsp/XS.xsp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index f05ea86bf1..eb3aac0e29 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1470,7 +1470,7 @@ sub send_gcode { Slic3r::encode_path($self->{send_gcode_file}), # Remove the UTF-8 flag from the perl string, so the LWP::UserAgent can insert # the UTF-8 encoded string into the request as a byte stream. - Encode::encode_utf8(Slic3r::path_to_filename($self->{send_gcode_file})) + Slic3r::path_to_filename_raw($self->{send_gcode_file}) ], print => $self->{send_gcode_file_print} ? 1 : 0, ], diff --git a/xs/xsp/XS.xsp b/xs/xsp/XS.xsp index e0f6ab18bf..e31570ca7e 100644 --- a/xs/xsp/XS.xsp +++ b/xs/xsp/XS.xsp @@ -119,6 +119,13 @@ path_to_filename(src) RETVAL = Slic3r::PerlUtils::path_to_filename(src); OUTPUT: RETVAL +local_encoded_string +path_to_filename_raw(src) + const char *src; + CODE: + RETVAL = Slic3r::PerlUtils::path_to_filename(src); + OUTPUT: RETVAL + std::string path_to_stem(src) const char *src;