mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Bgl: Fix conversion for Eastern European encoding
This commit is contained in:
parent
1e76ccf4d9
commit
ecdec2b5a6
|
@ -210,12 +210,9 @@ bool Babylon::read(std::string &source_charset, std::string &target_charset)
|
|||
{
|
||||
case 8:
|
||||
type = (unsigned int)block.data[2];
|
||||
if( type == 67 ) type = 1;
|
||||
if( type > 64 ) type -= 65;
|
||||
|
||||
if ( type >= 14 )
|
||||
type = 0;
|
||||
|
||||
m_defaultCharset = bgl_charset[type];
|
||||
break;
|
||||
default:
|
||||
|
@ -284,7 +281,6 @@ bool Babylon::read(std::string &source_charset, std::string &target_charset)
|
|||
break;
|
||||
case 26:
|
||||
type = (unsigned int)block.data[2];
|
||||
if( type == 67 ) type = 1;
|
||||
if( type > 64 ) type -= 65;
|
||||
if ( type >= 14 )
|
||||
type = 0;
|
||||
|
@ -293,7 +289,6 @@ bool Babylon::read(std::string &source_charset, std::string &target_charset)
|
|||
break;
|
||||
case 27:
|
||||
type = (unsigned int)block.data[2];
|
||||
if( type == 67 ) type = 1;
|
||||
if( type > 64 ) type -= 65;
|
||||
if ( type >= 14 )
|
||||
type = 0;
|
||||
|
|
|
@ -120,7 +120,7 @@ const std::string bgl_charsetname[] = {
|
|||
const std::string bgl_charset[] = {
|
||||
"WINDOWS-1252", /*Default*/
|
||||
"WINDOWS-1252", /*Latin*/
|
||||
"ISO-8859-2", /*Eastern European*/
|
||||
"WINDOWS-1250", /*Eastern European*/
|
||||
"WINDOWS-1251", /*Cyriilic*/
|
||||
"CP932", /*Japanese*/
|
||||
"BIG5", /*Traditional Chinese*/
|
||||
|
|
Loading…
Reference in a new issue