From 97c44f4156790b2cdeac0a649ca13b5317676e8b Mon Sep 17 00:00:00 2001 From: ski Date: Tue, 9 Dec 2014 16:24:00 +0300 Subject: [PATCH] 0023626: It's impossible to open files containing localisation characters in the name Files containing localisation characters can be opened and saved now properly. --- src/Draw/Draw_VariableCommands.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 "<