From: ski Date: Tue, 9 Dec 2014 13:24:00 +0000 (+0300) Subject: 0023626: It's impossible to open files containing localisation characters in the... X-Git-Tag: V6_9_0_beta~197 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=97c44f4156790b2cdeac0a649ca13b5317676e8b 0023626: It's impossible to open files containing localisation characters in the name Files containing localisation characters can be opened and saved now properly. --- diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index 2f93b05cc3..9b067ccfe5 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -41,6 +41,7 @@ extern Draw_Viewer dout; #include #include +#include Standard_Boolean Draw_ParseFailed; @@ -146,10 +147,10 @@ static Standard_Integer save(Draw_Interpretor& di, Standard_Integer n, const cha const char* name = a[2]; - filebuf fic; - ostream os(&fic); + ofstream os; os.precision(15); - if (!fic.open(name,ios::out)) { + OSD_OpenStream(os, name, ios::out); + if (!os.rdbuf()->is_open()) { di << "Cannot open file for writing "<