+void StringTestCase::ConversionUTF8()
+{
+ const wchar_t wcs[] = { 0x00A3, 0x00A3, 0x00A3, 0x00A3, 0 }; // pound signs
+ const char *utf8 = "\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3";
+
+ wxCSConv conv(_T("utf-8"));
+
+#if wxUSE_UNICODE
+ wxCharBuffer buf(wxString(wcs).mb_str(conv));
+
+ CPPUNIT_ASSERT( strcmp(buf, utf8) == 0 );
+#else // !wxUSE_UNICODE
+ wxWCharBuffer wbuf(wxString(utf8).wc_str(conv));
+
+ CPPUNIT_ASSERT( wcscmp(wbuf, wcs) == 0 );
+#endif // wxUSE_UNICODE/!wxUSE_UNICODE
+}
+