iconv-based conversion works again, after being broken for a while

(the code always felt back to wxEncodingConverter)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-01-24 21:14:21 +00:00
parent c44fdc9401
commit 4f61e22c77

View File

@ -508,16 +508,11 @@ extern long wxCharsetToCodepage(const wxChar *name)
class wxCharacterSet
{
public:
wxCharacterSet(const wxChar*name)
: cname(name) {}
virtual ~wxCharacterSet()
{}
virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n)
{ return (size_t)-1; }
virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
{ return (size_t)-1; }
virtual bool usable()
{ return FALSE; }
wxCharacterSet(const wxChar*name) : cname(name) {}
virtual ~wxCharacterSet() {}
virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) = 0;
virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) = 0;
virtual bool usable() const = 0;
public:
const wxChar*cname;
};
@ -538,7 +533,7 @@ public:
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
{ return work ? work->WC2MB(buf,psz,n) : (size_t)-1; }
bool usable()
bool usable() const
{ return work!=NULL; }
public:
wxMBConv*work;
@ -839,7 +834,7 @@ public:
return len ? (buf ? len : len-1) : (size_t)-1;
}
bool usable()
bool usable() const
{ return m_CodePage != -1; }
public:
@ -889,7 +884,7 @@ public:
return inbuf;
}
bool usable()
bool usable() const
{ return (enc!=wxFONTENCODING_SYSTEM) && (enc!=wxFONTENCODING_DEFAULT); }
public: