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:
parent
c44fdc9401
commit
4f61e22c77
@ -508,16 +508,11 @@ extern long wxCharsetToCodepage(const wxChar *name)
|
|||||||
class wxCharacterSet
|
class wxCharacterSet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCharacterSet(const wxChar*name)
|
wxCharacterSet(const wxChar*name) : cname(name) {}
|
||||||
: cname(name) {}
|
virtual ~wxCharacterSet() {}
|
||||||
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 size_t MB2WC(wchar_t *buf, const char *psz, size_t n)
|
virtual bool usable() const = 0;
|
||||||
{ 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; }
|
|
||||||
public:
|
public:
|
||||||
const wxChar*cname;
|
const wxChar*cname;
|
||||||
};
|
};
|
||||||
@ -538,7 +533,7 @@ public:
|
|||||||
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
|
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
|
||||||
{ return work ? work->WC2MB(buf,psz,n) : (size_t)-1; }
|
{ return work ? work->WC2MB(buf,psz,n) : (size_t)-1; }
|
||||||
|
|
||||||
bool usable()
|
bool usable() const
|
||||||
{ return work!=NULL; }
|
{ return work!=NULL; }
|
||||||
public:
|
public:
|
||||||
wxMBConv*work;
|
wxMBConv*work;
|
||||||
@ -839,7 +834,7 @@ public:
|
|||||||
return len ? (buf ? len : len-1) : (size_t)-1;
|
return len ? (buf ? len : len-1) : (size_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool usable()
|
bool usable() const
|
||||||
{ return m_CodePage != -1; }
|
{ return m_CodePage != -1; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -889,7 +884,7 @@ public:
|
|||||||
return inbuf;
|
return inbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool usable()
|
bool usable() const
|
||||||
{ return (enc!=wxFONTENCODING_SYSTEM) && (enc!=wxFONTENCODING_DEFAULT); }
|
{ return (enc!=wxFONTENCODING_SYSTEM) && (enc!=wxFONTENCODING_DEFAULT); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user