]> git.saurik.com Git - wxWidgets.git/commitdiff
use const wxMBConv& instead of wxMBConv& in public methods so that it's possible...
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 11 May 2007 20:55:24 +0000 (20:55 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 11 May 2007 20:55:24 +0000 (20:55 +0000)
don't use global wxConvUTF8 object internally, it may be unavailable at static objects destruction time

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

16 files changed:
docs/latex/wx/config.tex
docs/latex/wx/datistrm.tex
docs/latex/wx/datostrm.tex
docs/latex/wx/ffile.tex
docs/latex/wx/file.tex
docs/latex/wx/fileconf.tex
docs/latex/wx/tempfile.tex
docs/latex/wx/textfile.tex
docs/latex/wx/txtstrm.tex
docs/latex/wx/wxstring.tex
include/wx/archive.h
include/wx/file.h
include/wx/memtext.h
include/wx/string.h
src/common/strconv.cpp
src/common/string.cpp

index d7f6d8efcdb2b4e34cd66eb147ca64320233fcd4..b7cd63b6cb0b8d6874fb596c9e28d4a09c11c313 100644 (file)
@@ -353,7 +353,7 @@ The following functions control this option:
  \param{const wxString\& }{localFilename = wxEmptyString},
  \param{const wxString\& }{globalFilename = wxEmptyString},
  \param{long}{ style = 0},
  \param{const wxString\& }{localFilename = wxEmptyString},
  \param{const wxString\& }{globalFilename = wxEmptyString},
  \param{long}{ style = 0},
- \param{wxMBConv\&}{ conv = wxConvUTF8}}
+ \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 This is the default and only constructor of the wxConfigBase class, and
 derived classes.
 
 This is the default and only constructor of the wxConfigBase class, and
 derived classes.
index 4c30437f7011bf5baeb12609dbed3b4aed600230..19fcc7646512ea22a488e4eeba797fcd122b128c 100644 (file)
@@ -43,7 +43,7 @@ None
 
 \func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}}
 
 
 \func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}}
 
-\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
+\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}, \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 Constructs a datastream object from an input stream. Only read methods will
 be available. The second form is only available in Unicode build of wxWidgets.
 
 Constructs a datastream object from an input stream. Only read methods will
 be available. The second form is only available in Unicode build of wxWidgets.
index 3045a75eca0abfe8efca6c21080a7f7f322d3860..23855001c8a2038e17b8d5e72fb92dbbf2136d9c 100644 (file)
@@ -27,7 +27,7 @@ None
 
 \func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}}
 
 
 \func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}}
 
-\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
+\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}, \param{const wxMBConv\&}{ conv = wxConvAuto(){}
 
 Constructs a datastream object from an output stream. Only write methods will
 be available. The second form is only available in Unicode build of wxWidgets.
 
 Constructs a datastream object from an output stream. Only write methods will
 be available. The second form is only available in Unicode build of wxWidgets.
index e4b09dbb036db9ed9727b5f5ada8caedc54da817..789a462ada165c2046ee736a9bb97c0715ac7122 100644 (file)
@@ -210,7 +210,7 @@ The number of bytes read.
 
 \membersection{wxFFile::ReadAll}\label{wxffilereadall}
 
 
 \membersection{wxFFile::ReadAll}\label{wxffilereadall}
 
-\func{bool}{ReadAll}{\param{wxString *}{ str}, \param{wxMBConv\&}{ conv = wxConvUTF8}}
+\func{bool}{ReadAll}{\param{wxString *}{ str}, \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 Reads the entire contents of the file into a string.
 
 
 Reads the entire contents of the file into a string.
 
@@ -277,7 +277,7 @@ Number of bytes written.
 
 \membersection{wxFFile::Write}\label{wxffilewrites}
 
 
 \membersection{wxFFile::Write}\label{wxffilewrites}
 
-\func{bool}{Write}{\param{const wxString\& }{s}, \param{wxMBConv\&}{ conv = wxConvUTF8}}
+\func{bool}{Write}{\param{const wxString\& }{s}, \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 Writes the contents of the string to the file, returns \true on success.
 
 
 Writes the contents of the string to the file, returns \true on success.
 
index 7977c6d67bea1cd5fe449ce351754e969ffc4cbf..bf5cde3d8fe23aac84461b0026e2639a65c6192b 100644 (file)
@@ -335,7 +335,7 @@ the number of bytes actually written
 
 \membersection{wxFile::Write}\label{wxfilewrites}
 
 
 \membersection{wxFile::Write}\label{wxfilewrites}
 
-\func{bool}{Write}{\param{const wxString\& }{s}, \param{wxMBConv\&}{ conv = wxConvUTF8}}
+\func{bool}{Write}{\param{const wxString\& }{s}, \param{const wxMBConv\&}{ conv = wxConvUTF8}}
 
 Writes the contents of the string to the file, returns true on success.
 
 
 Writes the contents of the string to the file, returns true on success.
 
index 0c2003d6786487a389caccfa37db3d93bbb41b24..402952cee54a3642c3307ce1cbf04524f252a19f 100644 (file)
@@ -34,7 +34,7 @@ Windows.
 
 \membersection{wxFileConfig::wxFileConfig}\label{wxfileconfigctor}
 
 
 \membersection{wxFileConfig::wxFileConfig}\label{wxfileconfigctor}
 
-\func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{wxMBConv\& }{conv = wxConvUTF8}}
+\func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
 
 Read the config data from the specified stream instead of the associated file,
 as usual.
 
 Read the config data from the specified stream instead of the associated file,
 as usual.
@@ -72,7 +72,7 @@ path name.
 
 \membersection{wxFileConfig::Save}\label{wxfileconfigsave}
 
 
 \membersection{wxFileConfig::Save}\label{wxfileconfigsave}
 
-\func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{wxMBConv\& }{conv = wxConvUTF8}}
+\func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
 
 Saves all config data to the given stream, returns \true if data was saved
 successfully or \false on error.
 
 Saves all config data to the given stream, returns \true if data was saved
 successfully or \false on error.
index e7c0c98f681a8aa142f55293de1fb18af67bdac0..60776d386d3dfa2043a5d74c7e1fa0bdbc2f4349 100644 (file)
@@ -107,7 +107,7 @@ Write to the file, return {\tt true} on success, {\tt false} on failure.
 
 \membersection{wxTempFile::Write}\label{wxtempfilewrites}
 
 
 \membersection{wxTempFile::Write}\label{wxtempfilewrites}
 
-\func{bool}{Write}{\param{const wxString\& }{str}, \param{wxMBConv\&}{ conv = wxConvLibc}}
+\func{bool}{Write}{\param{const wxString\& }{str}, \param{const wxMBConv\&}{ conv = wxConvUTF8}}
 
 Write to the file, return {\tt true} on success, {\tt false} on failure.
 
 
 Write to the file, return {\tt true} on success, {\tt false} on failure.
 
index c139c6262afb1066f2e05dcdeb715bbc2b268341..0d6c69c236e3543442cec6112b9b94c8328d2b0f 100644 (file)
@@ -262,9 +262,9 @@ Insert a line before the line number {\it n}.
 
 \membersection{wxTextFile::Open}\label{wxtextfileopen}
 
 
 \membersection{wxTextFile::Open}\label{wxtextfileopen}
 
-\constfunc{bool}{Open}{\param{wxMBConv\&}{ conv = wxConvUTF8}}
+\constfunc{bool}{Open}{\param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 
-\constfunc{bool}{Open}{\param{const wxString\& }{strFile}, \param{wxMBConv\&}{ conv = wxConvUTF8}}
+\constfunc{bool}{Open}{\param{const wxString\& }{strFile}, \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 Open() opens the file with the given name or the name which was given in the
 \helpref{constructor}{wxtextfilector} and also loads file in memory on
 
 Open() opens the file with the given name or the name which was given in the
 \helpref{constructor}{wxtextfilector} and also loads file in memory on
@@ -288,7 +288,7 @@ Delete all lines from the file, set current line number to 0.
 
 \membersection{wxTextFile::Write}\label{wxtextfilewrite}
 
 
 \membersection{wxTextFile::Write}\label{wxtextfilewrite}
 
-\constfunc{bool}{Write}{\param{wxTextFileType }{typeNew = wxTextFileType\_None}, \param{wxMBConv\&}{ conv = wxConvUTF8}}
+\constfunc{bool}{Write}{\param{wxTextFileType }{typeNew = wxTextFileType\_None}, \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 Change the file on disk. The {\it typeNew} parameter allows you to change the
 file format (default argument means "don't change type") and may be used to
 
 Change the file on disk. The {\it typeNew} parameter allows you to change the
 file format (default argument means "don't change type") and may be used to
index 70afd2cca0df5b06c03892b63327ca2813a8def1..d85ea16e8d5d82501e76b25dc59cc2baf75629a0 100644 (file)
@@ -45,7 +45,7 @@ For example:
 \membersection{wxTextInputStream::wxTextInputStream}\label{wxtextinputstreamctor}
 
 \func{}{wxTextInputStream}{\param{wxInputStream\&}{ stream}, \param{const wxString\&}{ sep=" $\backslash$t"}, 
 \membersection{wxTextInputStream::wxTextInputStream}\label{wxtextinputstreamctor}
 
 \func{}{wxTextInputStream}{\param{wxInputStream\&}{ stream}, \param{const wxString\&}{ sep=" $\backslash$t"}, 
-  \param{wxMBConv\&}{ conv = wxConvUTF8} }
+  \param{const wxMBConv\&}{ conv = wxConvAuto()} }
 
 Constructs a text stream associated to the given input stream.
 
 
 Constructs a text stream associated to the given input stream.
 
@@ -216,7 +216,7 @@ and Unix in their native formats (concerning the line ending).
 
 \membersection{wxTextOutputStream::wxTextOutputStream}\label{wxtextoutputstreamctor}
 
 
 \membersection{wxTextOutputStream::wxTextOutputStream}\label{wxtextoutputstreamctor}
 
-\func{}{wxTextOutputStream}{\param{wxOutputStream\&}{ stream}, \param{wxEOL}{ mode = wxEOL\_NATIVE}, \param{wxMBConv\&}{ conv = wxConvUTF8}}
+\func{}{wxTextOutputStream}{\param{wxOutputStream\&}{ stream}, \param{wxEOL}{ mode = wxEOL\_NATIVE}, \param{const wxMBConv\&}{ conv = wxConvAuto()}}
 
 Constructs a text stream object associated to the given output stream.
 
 
 Constructs a text stream object associated to the given output stream.
 
index 57504f03e6199adbf2f75523e02eb469f9fcb40d..6b175c14553d71dfe7859fd8ba9c190b9b32fb18 100644 (file)
@@ -454,7 +454,7 @@ For ANSI builds only (note the use of {\tt char} instead of {\tt wxChar}).
 The following constructors allow you to construct wxString from a wide string
 in ANSI build or from a C string in Unicode build.
 
 The following constructors allow you to construct wxString from a wide string
 in ANSI build or from a C string in Unicode build.
 
-\func{}{wxString}{\param{const wchar\_t*}{ psz}, \param{wxMBConv\&}{ conv}, \param{size\_t}{ nLength = wxSTRING\_MAXLEN}}
+\func{}{wxString}{\param{const wchar\_t*}{ psz}, \param{const wxMBConv\&}{ conv}, \param{size\_t}{ nLength = wxSTRING\_MAXLEN}}
 
 Initializes the string from first \arg{nLength} characters of wide string. 
 The default value of {\tt wxSTRING\_MAXLEN} means take all the string.
 
 Initializes the string from first \arg{nLength} characters of wide string. 
 The default value of {\tt wxSTRING\_MAXLEN} means take all the string.
@@ -462,7 +462,7 @@ In ANSI build, \arg{conv}'s
 \helpref{WC2MB}{wxmbconvwc2mb} method is called to
 convert \arg{psz} to wide string. It is ignored in Unicode build.
 
 \helpref{WC2MB}{wxmbconvwc2mb} method is called to
 convert \arg{psz} to wide string. It is ignored in Unicode build.
 
-\func{}{wxString}{\param{const char*}{ psz}, \param{wxMBConv\&}{ conv = wxConvLibc}, \param{size\_t}{ nLength = wxSTRING\_MAXLEN}}
+\func{}{wxString}{\param{const char*}{ psz}, \param{const wxMBConv\&}{ conv = wxConvLibc}, \param{size\_t}{ nLength = wxSTRING\_MAXLEN}}
 
 Initializes the string from first \arg{nLength} characters of C string.
 The default value of {\tt wxSTRING\_MAXLEN} means take all the string.
 
 Initializes the string from first \arg{nLength} characters of C string.
 The default value of {\tt wxSTRING\_MAXLEN} means take all the string.
@@ -586,7 +586,7 @@ to a function expecting non-const pointer.
 
 \membersection{wxString::char\_str}\label{wxstringcharstr}
 
 
 \membersection{wxString::char\_str}\label{wxstringcharstr}
 
-\constfunc{wxWritableCharBuffer}{char\_str}{\param{wxMBConv\&}{ conv = wxConvLibc}}
+\constfunc{wxWritableCharBuffer}{char\_str}{\param{const wxMBConv\&}{ conv = wxConvLibc}}
 
 Returns an object with string data that is implicitly convertible to
 {\tt char*} pointer. Note that any change to the returned buffer is lost and so
 
 Returns an object with string data that is implicitly convertible to
 {\tt char*} pointer. Note that any change to the returned buffer is lost and so
@@ -980,9 +980,9 @@ Returns \true if the string contents matches a mask containing '*' and '?'.
 
 \membersection{wxString::mb\_str}\label{wxstringmbstr}
 
 
 \membersection{wxString::mb\_str}\label{wxstringmbstr}
 
-\constfunc{const char*}{mb\_str}{\param{wxMBConv\&}{ conv = wxConvLibc}}
+\constfunc{const char*}{mb\_str}{\param{const wxMBConv\&}{ conv = wxConvLibc}}
 
 
-\constfunc{const wxCharBuffer}{mb\_str}{\param{wxMBConv\&}{ conv = wxConvLibc}}
+\constfunc{const wxCharBuffer}{mb\_str}{\param{const wxMBConv\&}{ conv = wxConvLibc}}
 
 Returns multibyte (C string) representation of the string.
 In Unicode build, converts using \arg{conv}'s \helpref{cWC2MB}{wxmbconvcwc2mb}
 
 Returns multibyte (C string) representation of the string.
 In Unicode build, converts using \arg{conv}'s \helpref{cWC2MB}{wxmbconvcwc2mb}
@@ -1350,9 +1350,9 @@ UTF-8 build.
 
 \membersection{wxString::wc\_str}\label{wxstringwcstr}
 
 
 \membersection{wxString::wc\_str}\label{wxstringwcstr}
 
-\constfunc{const wchar\_t*}{wc\_str}{\param{wxMBConv\&}{ conv}}
+\constfunc{const wchar\_t*}{wc\_str}{\param{const wxMBConv\&}{ conv}}
 
 
-\constfunc{const wxWCharBuffer}{wc\_str}{\param{wxMBConv\&}{ conv}}
+\constfunc{const wxWCharBuffer}{wc\_str}{\param{const wxMBConv\&}{ conv}}
 
 Returns wide character representation of the string.
 In ANSI build, converts using \arg{conv}'s \helpref{cMB2WC}{wxmbconvcmb2wc}
 
 Returns wide character representation of the string.
 In ANSI build, converts using \arg{conv}'s \helpref{cMB2WC}{wxmbconvcmb2wc}
index 7acebd1e28e6be3b68a23fe0f77cb2086fa19a63..f814b8f3b8af42648fc44c86336626c97b9aa98a 100644 (file)
@@ -341,6 +341,8 @@ public:
         const wxString& name,
         wxPathFormat format = wxPATH_NATIVE) const = 0;
 
         const wxString& name,
         wxPathFormat format = wxPATH_NATIVE) const = 0;
 
+    // FIXME-UTF8: remove these from this file, they are used for ANSI
+    //             build only
     void SetConv(wxMBConv& conv) { m_pConv = &conv; }
     wxMBConv& GetConv() const
         { if (m_pConv) return *m_pConv; else return wxConvLocal; }
     void SetConv(wxMBConv& conv) { m_pConv = &conv; }
     wxMBConv& GetConv() const
         { if (m_pConv) return *m_pConv; else return wxConvLocal; }
index 9b81e4c7866e56911f20890497ad6dc4ae34c933..631f12c3c1d944e42ac109914b5bac014fed6557 100644 (file)
@@ -97,7 +97,7 @@ public:
     // returns the number of bytes written
   size_t Write(const void *pBuf, size_t nCount);
     // returns true on success
     // returns the number of bytes written
   size_t Write(const void *pBuf, size_t nCount);
     // returns true on success
-  bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8);
+  bool Write(const wxString& s, const wxMBConv& conv = wxMBConvUTF8());
     // flush data not yet written
   bool Flush();
 
     // flush data not yet written
   bool Flush();
 
@@ -167,7 +167,7 @@ public:
 
   // I/O (both functions return true on success, false on failure)
   bool Write(const void *p, size_t n) { return m_file.Write(p, n) == n; }
 
   // I/O (both functions return true on success, false on failure)
   bool Write(const void *p, size_t n) { return m_file.Write(p, n) == n; }
-  bool Write(const wxString& str, const wxMBConv& conv = wxConvUTF8)
+  bool Write(const wxString& str, const wxMBConv& conv = wxMBConvUTF8())
     { return m_file.Write(str, conv); }
 
   // different ways to close the file
     { return m_file.Write(str, conv); }
 
   // different ways to close the file
index a093f40b040c5e305248e62e57d11b0344dfbba0..23b7de18d316574a307a49e6d26b15d10edce2c0 100644 (file)
@@ -41,7 +41,7 @@ protected:
         { return true; }
 
     virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
         { return true; }
 
     virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
-                         const wxMBConv& WXUNUSED(conv) = wxConvUTF8)
+                         const wxMBConv& WXUNUSED(conv) = wxMBConvUTF8())
         { return true; }
 
 private:
         { return true; }
 
 private:
index a74b39807a01d841cef954cfb94458b1047e2d15..c2a60e233d5dedceb9a29277996e7dd0a9a1dc09 100644 (file)
@@ -485,9 +485,9 @@ private:
     { return ConvertStr(str, n, conv); }
 
   static wxCharBuffer ImplStr(const wchar_t* str)
     { return ConvertStr(str, n, conv); }
 
   static wxCharBuffer ImplStr(const wchar_t* str)
-    { return ConvertStr(str, npos, wxConvUTF8).data; }
+    { return ConvertStr(str, npos, wxMBConvUTF8()).data; }
   static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n)
   static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n)
-    { return ConvertStr(str, n, wxConvUTF8); }
+    { return ConvertStr(str, n, wxMBConvUTF8()); }
 
   size_t PosToImpl(size_t pos) const
   {
 
   size_t PosToImpl(size_t pos) const
   {
@@ -1144,21 +1144,22 @@ public:
     const char* ToUTF8() const { return wx_str(); }
 #elif wxUSE_UNICODE_WCHAR
     static wxString FromUTF8(const char *utf8)
     const char* ToUTF8() const { return wx_str(); }
 #elif wxUSE_UNICODE_WCHAR
     static wxString FromUTF8(const char *utf8)
-      { return wxString(utf8, wxConvUTF8); }
+      { return wxString(utf8, wxMBConvUTF8()); }
     static wxString FromUTF8(const char *utf8, size_t len)
     static wxString FromUTF8(const char *utf8, size_t len)
-      { return wxString(utf8, wxConvUTF8, len); }
-    const wxCharBuffer utf8_str() const { return mb_str(wxConvUTF8); }
+      { return wxString(utf8, wxMBConvUTF8(), len); }
+    const wxCharBuffer utf8_str() const { return mb_str(wxMBConvUTF8()); }
     const wxCharBuffer ToUTF8() const { return utf8_str(); }
 #else // ANSI
     static wxString FromUTF8(const char *utf8)
     const wxCharBuffer ToUTF8() const { return utf8_str(); }
 #else // ANSI
     static wxString FromUTF8(const char *utf8)
-      { return wxString(wxConvUTF8.cMB2WC(utf8)); }
+      { return wxString(wxMBConvUTF8().cMB2WC(utf8)); }
     static wxString FromUTF8(const char *utf8, size_t len)
     {
       size_t wlen;
     static wxString FromUTF8(const char *utf8, size_t len)
     {
       size_t wlen;
-      wxWCharBuffer buf(wxConvUTF8.cMB2WC(utf8, len == npos ? wxNO_LEN : len, &wlen));
+      wxWCharBuffer buf(wxMBConvUTF8().cMB2WC(utf8, len == npos ? wxNO_LEN : len, &wlen));
       return wxString(buf.data(), wlen);
     }
       return wxString(buf.data(), wlen);
     }
-    const wxCharBuffer utf8_str() const { return wxConvUTF8.cWC2MB(wc_str()); }
+    const wxCharBuffer utf8_str() const
+      { return wxMBConvUTF8().cWC2MB(wc_str()); }
     const wxCharBuffer ToUTF8() const { return utf8_str(); }
 #endif
 
     const wxCharBuffer ToUTF8() const { return utf8_str(); }
 #endif
 
index 2a0cb613c663d598e89a26451adedef7f99fbabc..cd673cd72dfb2e95197687c080d1943e604b34b2 100644 (file)
@@ -2035,12 +2035,12 @@ public:
         //     http://msdn.microsoft.com/library/en-us/intl/unicode_17si.asp
         if ( m_CodePage == CP_UTF8 )
         {
         //     http://msdn.microsoft.com/library/en-us/intl/unicode_17si.asp
         if ( m_CodePage == CP_UTF8 )
         {
-            return wxConvUTF8.MB2WC(buf, psz, n);
+            return wxMBConvUTF8().MB2WC(buf, psz, n);
         }
 
         if ( m_CodePage == CP_UTF7 )
         {
         }
 
         if ( m_CodePage == CP_UTF7 )
         {
-            return wxConvUTF7.MB2WC(buf, psz, n);
+            return wxMBConvUTF7().MB2WC(buf, psz, n);
         }
 
         int flags = 0;
         }
 
         int flags = 0;
@@ -3626,7 +3626,7 @@ wxWCharBuffer wxSafeConvertMB2WX(const char *s)
 
     wxWCharBuffer wbuf(wxConvLibc.cMB2WX(s));
     if ( !wbuf )
 
     wxWCharBuffer wbuf(wxConvLibc.cMB2WX(s));
     if ( !wbuf )
-        wbuf = wxConvUTF8.cMB2WX(s);
+        wbuf = wxMBConvUTF8().cMB2WX(s);
     if ( !wbuf )
         wbuf = wxConvISO8859_1.cMB2WX(s);
 
     if ( !wbuf )
         wbuf = wxConvISO8859_1.cMB2WX(s);
 
index 3ae68d82e6786b9958b5c4d8516da8c599ceaf3c..5d080e91296e9a6bc6bb2d6c068a7d5076fd2550 100644 (file)
@@ -340,7 +340,7 @@ wxString::SubstrBufFromMB wxString::ConvertStr(const char *psz, size_t nLength,
         return SubstrBufFromMB("", 0);
 
     // and then to UTF-8:
         return SubstrBufFromMB("", 0);
 
     // and then to UTF-8:
-    SubstrBufFromMB buf(ConvertStr(wcBuf, wcLen, wxConvUTF8));
+    SubstrBufFromMB buf(ConvertStr(wcBuf, wcLen, wxMBConvUTF8()));
     // widechar -> UTF-8 conversion isn't supposed to ever fail:
     wxASSERT_MSG( buf.data, _T("conversion to UTF-8 failed") );
 
     // widechar -> UTF-8 conversion isn't supposed to ever fail:
     wxASSERT_MSG( buf.data, _T("conversion to UTF-8 failed") );
 
@@ -382,9 +382,9 @@ const wxCharBuffer wxString::mb_str(const wxMBConv& conv) const
 
 const wxWCharBuffer wxString::wc_str() const
 {
 
 const wxWCharBuffer wxString::wc_str() const
 {
-    return wxConvUTF8.cMB2WC(m_impl.c_str(),
-                             m_impl.length() + 1 /* size, not length */,
-                             NULL);
+    return wxMBConvUTF8().cMB2WC(m_impl.c_str(),
+                                 m_impl.length() + 1 /* size, not length */,
+                                 NULL);
 }
 
 const wxCharBuffer wxString::mb_str(const wxMBConv& conv) const
 }
 
 const wxCharBuffer wxString::mb_str(const wxMBConv& conv) const
@@ -396,9 +396,9 @@ const wxCharBuffer wxString::mb_str(const wxMBConv& conv) const
 
     size_t wcLen;
     wxWCharBuffer wcBuf(
 
     size_t wcLen;
     wxWCharBuffer wcBuf(
-            wxConvUTF8.cMB2WC(m_impl.c_str(),
-                              m_impl.length() + 1 /* size, not length */,
-                              &wcLen));
+            wxMBConvUTF8().cMB2WC(m_impl.c_str(),
+                                  m_impl.length() + 1 /* size, not length */,
+                                  &wcLen));
     if ( !wcLen )
         return wxCharBuffer("");
 
     if ( !wcLen )
         return wxCharBuffer("");