]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wxchar.cpp
O_BINARY added to wxFile::Create
[wxWidgets.git] / src / common / wxchar.cpp
index baa67e326d93c1440ea23520f080338abe6107fb..c2deb9b203f7e07da49a1659989851071dda8f37 100644 (file)
@@ -189,11 +189,11 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt
 #endif
 
 #ifndef wxSetlocale
-WXDLLEXPORT wxChar * wxSetlocale(int category, const wxChar *locale)
+WXDLLEXPORT wxWCharBuffer wxSetlocale(int category, const wxChar *locale)
 {
-  setlocale(category, wxConvLibc.cWX2MB(locale));
-  // FIXME
-  return (wxChar *)NULL;
+    char *localeOld = setlocale(category, wxConvLibc.cWX2MB(locale));
+
+    return wxWCharBuffer(wxConvLibc.cMB2WC(localeOld));
 }
 #endif