]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/streams/sstream.cpp
Ignore empty LC_XXX variables in locale detection code.
[wxWidgets.git] / tests / streams / sstream.cpp
index 266360911ec13e4c6ffe47af1252596f4c3a70f7..3d65dd7eae8566376a1bd310f04fbcdc7019617c 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // RCS-ID:      $Id$
 // Copyright:   (c) 2004 Vadim Zeitlin
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx/wx.h".
@@ -106,14 +106,8 @@ void strStream::CheckString(const wxString& text)
 {
     wxStringOutputStream sos;
 
-    size_t len = text.length();
-#if wxUSE_UNICODE
-    const wxCharBuffer textMB(wxConvLibc.cWC2MB(text.wc_str(), len + 1, &len));
-#else
-    const char *textMB = text.c_str();
-#endif
-
-    sos.Write(textMB, len);
+    const wxCharBuffer buf(text.To8BitData());
+    sos.Write(buf, buf.length());
 
     CPPUNIT_ASSERT_EQUAL( text, sos.GetString() );
 }