Bgl: Fix conversion for Eastern European encoding

This commit is contained in:
Abs62 2017-07-07 17:16:33 +03:00
parent 1e76ccf4d9
commit ecdec2b5a6
2 changed files with 1 additions and 6 deletions

View file

@ -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;

View file

@ -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*/