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:
|
case 8:
|
||||||
type = (unsigned int)block.data[2];
|
type = (unsigned int)block.data[2];
|
||||||
if( type == 67 ) type = 1;
|
|
||||||
if( type > 64 ) type -= 65;
|
if( type > 64 ) type -= 65;
|
||||||
|
|
||||||
if ( type >= 14 )
|
if ( type >= 14 )
|
||||||
type = 0;
|
type = 0;
|
||||||
|
|
||||||
m_defaultCharset = bgl_charset[type];
|
m_defaultCharset = bgl_charset[type];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -284,7 +281,6 @@ bool Babylon::read(std::string &source_charset, std::string &target_charset)
|
||||||
break;
|
break;
|
||||||
case 26:
|
case 26:
|
||||||
type = (unsigned int)block.data[2];
|
type = (unsigned int)block.data[2];
|
||||||
if( type == 67 ) type = 1;
|
|
||||||
if( type > 64 ) type -= 65;
|
if( type > 64 ) type -= 65;
|
||||||
if ( type >= 14 )
|
if ( type >= 14 )
|
||||||
type = 0;
|
type = 0;
|
||||||
|
@ -293,7 +289,6 @@ bool Babylon::read(std::string &source_charset, std::string &target_charset)
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
type = (unsigned int)block.data[2];
|
type = (unsigned int)block.data[2];
|
||||||
if( type == 67 ) type = 1;
|
|
||||||
if( type > 64 ) type -= 65;
|
if( type > 64 ) type -= 65;
|
||||||
if ( type >= 14 )
|
if ( type >= 14 )
|
||||||
type = 0;
|
type = 0;
|
||||||
|
|
|
@ -120,7 +120,7 @@ const std::string bgl_charsetname[] = {
|
||||||
const std::string bgl_charset[] = {
|
const std::string bgl_charset[] = {
|
||||||
"WINDOWS-1252", /*Default*/
|
"WINDOWS-1252", /*Default*/
|
||||||
"WINDOWS-1252", /*Latin*/
|
"WINDOWS-1252", /*Latin*/
|
||||||
"ISO-8859-2", /*Eastern European*/
|
"WINDOWS-1250", /*Eastern European*/
|
||||||
"WINDOWS-1251", /*Cyriilic*/
|
"WINDOWS-1251", /*Cyriilic*/
|
||||||
"CP932", /*Japanese*/
|
"CP932", /*Japanese*/
|
||||||
"BIG5", /*Traditional Chinese*/
|
"BIG5", /*Traditional Chinese*/
|
||||||
|
|
Loading…
Reference in a new issue