mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
fix:bgl encoding convert exception
This commit is contained in:
parent
bc2a64f94c
commit
e4595fb6d9
4
iconv.cc
4
iconv.cc
|
@ -26,8 +26,10 @@ Iconv::~Iconv()
|
|||
|
||||
QString Iconv::convert(void const* & inBuf, size_t& 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