summaryrefslogtreecommitdiff
blob: f10c731c597ac8dc74ee84dbfec8f879c9f33457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
catalog.cpp:1155:20: error: 'class wxCharBuffer' has no member named 'length'

http://www.poedit.net/trac/ticket/513


--- a/src/catalog.cpp
+++ b/src/catalog.cpp
@@ -1151,8 +1151,13 @@ inline bool CanEncodeStringToCharset(const wxString& s, wxMBConv& conv)
 {
     if (s.empty())
         return true;
-    wxCharBuffer converted(s.mb_str(conv));
+    const wxCharBuffer converted(s.mb_str(conv));
+#if wxCHECK_VERSION(2,9,0)
     if ( converted.length() == 0 )
+#else
+    const char *cs = (const char*)converted;
+    if ( cs == NULL || strlen(cs) == 0 )
+#endif
         return false;
     return true;
 }