mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +00:00
fix:bgl encoding convert exception
This commit is contained in:
parent
bc2a64f94c
commit
e4595fb6d9
6
iconv.cc
6
iconv.cc
|
@ -26,8 +26,10 @@ Iconv::~Iconv()
|
|||
|
||||
QString Iconv::convert(void const* & inBuf, size_t& inBytesLeft)
|
||||
{
|
||||
return codec->toUnicode(static_cast<const char*>(inBuf), inBytesLeft);
|
||||
|
||||
if( codec )
|
||||
return codec->toUnicode( static_cast< const char * >( inBuf ), inBytesLeft );
|
||||
QByteArray ba( static_cast< const char * >( inBuf ), inBytesLeft );
|
||||
return QString( ba );
|
||||
}
|
||||
|
||||
gd::wstring Iconv::toWstring( char const * fromEncoding, void const * fromData,
|
||||
|
|
Loading…
Reference in a new issue