utf: output_stream 3
[scilab.git] / scilab / modules / output_stream / src / cpp / Diary.cpp
index 5d4d42e..482cbfa 100644 (file)
@@ -115,14 +115,7 @@ void Diary::write(const std::string& _str, bool bInput)
                 {
                     if ((PrefixIoModeFilter == PREFIX_FILTER_INPUT_AND_OUTPUT) || (PrefixIoModeFilter == PREFIX_FILTER_ONLY_INPUT))
                     {
-                        char *timeInfo = wide_string_to_UTF8((wchar_t *) getDiaryDate(PrefixTimeFormat).c_str());
-
-                        if (timeInfo)
-                        {
-                            fileDiary << timeInfo << " ";
-                            FREE(timeInfo);
-                            timeInfo = NULL;
-                        }
+                        fileDiary << getDiaryDate(PrefixTimeFormat) << " ";
                     }
                     if (line)
                     {
@@ -136,14 +129,7 @@ void Diary::write(const std::string& _str, bool bInput)
                 {
                     if ((PrefixIoModeFilter == PREFIX_FILTER_INPUT_AND_OUTPUT) || (PrefixIoModeFilter == PREFIX_FILTER_ONLY_OUTPUT))
                     {
-                        char *timeInfo = wide_string_to_UTF8((wchar_t *) getDiaryDate(PrefixTimeFormat).c_str());
-
-                        if (timeInfo)
-                        {
-                            fileDiary << timeInfo << " ";
-                            FREE(timeInfo);
-                            timeInfo = NULL;
-                        }
+                        fileDiary << getDiaryDate(PrefixTimeFormat) << " ";
                     }
                     if (line)
                     {
@@ -151,12 +137,6 @@ void Diary::write(const std::string& _str, bool bInput)
                     }
                 }
             }
-
-            if (line)
-            {
-                FREE(line);
-                line = NULL;
-            }
         }
         fileDiary.close();
     }