diff --git a/locale/pt_BR.po b/locale/pt_BR.po index e8e65e1..bf98b31 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-10 10:12-0300\n" +"POT-Creation-Date: 2017-08-10 10:21-0300\n" "PO-Revision-Date: 2017-02-15 17:08-0200\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português \n" @@ -419,11 +419,6 @@ msgstr "Não foi possível conectar a %s" msgid "Can't connect to %s:%s" msgstr "Não foi possível conectar a %s:%s" -#: main.c:70 -#, fuzzy -msgid "Can't connect to DBUS server" -msgstr "Não foi possível conectar a %s" - #: selection.c:425 #, c-format msgid "Can't convert line %d from %s to %s" @@ -438,10 +433,6 @@ msgstr "Recortar não permitido em seleção retangular" msgid "Can't determine value for environment variable \"%s\" " msgstr "Não consigo determinar o valor da variável de ambiente \"%s\" " -#: main.c:115 -msgid "Can't get DBUS object name" -msgstr "" - #: ft.c:413 msgid "Can't get file size" msgstr "Não foi possível obter o tamanho do arquivo" @@ -663,11 +654,6 @@ msgstr "Configurar host" msgid "Connect on startup" msgstr "Conectar ao iniciar" -#: gobject.c:205 -#, fuzzy -msgid "Connecting to host" -msgstr "Não foi possível conectar ao servidor" - #: connect.c:215 connect.c:311 connect.c:320 connect.c:382 connect.c:397 #: connect.c:413 connect.c:427 connect.c:447 connect.c:461 connect.c:477 #: connect.c:573 @@ -1927,11 +1913,6 @@ msgstr "Iniciar transferência de arquivo" msgid "Starting" msgstr "Iniciando" -#: gobject.c:193 -#, c-format -msgid "State %04d can't accept requests" -msgstr "" - #: security.c:237 msgid "Subject issuer mismatch" msgstr "Divergência na identidade do emissor" @@ -2417,11 +2398,6 @@ msgstr "Valor de cor inválido ou inesperado: \"%s\"" msgid "Unexpected or unknown security status" msgstr "Estado de segurança inesperado ou desconhecido." -#: gobject.c:208 -#, fuzzy, c-format -msgid "Unexpected state %04d" -msgstr "Alvo inesperado \"%s\"" - #: actions.c:391 #, c-format msgid "Unexpected target \"%s\"" @@ -2826,6 +2802,10 @@ msgstr "translator-credits" #~ "32768. Valores maiores trazem maior performance, porem, nem todos os " #~ "hosts podem suportá-los." +#, fuzzy +#~ msgid "Can't connect to DBUS server" +#~ msgstr "Não foi possível conectar a %s" + #~ msgid "Can't start download." #~ msgstr "Não foi possível iniciar o download." @@ -2862,6 +2842,10 @@ msgstr "translator-credits" #~ msgid "Complete" #~ msgstr "Completo" +#, fuzzy +#~ msgid "Connecting to host" +#~ msgstr "Não foi possível conectar ao servidor" + #~ msgid "Copiar tudo" #~ msgstr "Copiar tudo" @@ -3224,6 +3208,10 @@ msgstr "translator-credits" #~ msgid "Unexpected element <%s>" #~ msgstr "Elemento <%s> inesperado" +#, fuzzy +#~ msgid "Unexpected state %04d" +#~ msgstr "Alvo inesperado \"%s\"" + #~ msgid "" #~ "Unknown host:\n" #~ "%s" diff --git a/locale/pw3270.pot b/locale/pw3270.pot index 9476c8e..6d7ce90 100644 --- a/locale/pw3270.pot +++ b/locale/pw3270.pot @@ -9,7 +9,7 @@ msgstr "" "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-10 10:12-0300\n" +"POT-Creation-Date: 2017-08-10 13:47-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,7 +20,7 @@ msgstr "" "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-10 10:12-0300\n" +"POT-Creation-Date: 2017-08-10 13:47-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,17 +39,6 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -"#-#-#-#-# dbus3270.pot (PACKAGE VERSION) #-#-#-#-#\n" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-10 10:12-0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" #: window.c:329 #, c-format @@ -435,10 +424,6 @@ msgstr "" msgid "Can't connect to %s:%s" msgstr "" -#: main.c:70 -msgid "Can't connect to DBUS server" -msgstr "" - #: selection.c:425 #, c-format msgid "Can't convert line %d from %s to %s" @@ -453,10 +438,6 @@ msgstr "" msgid "Can't determine value for environment variable \"%s\" " msgstr "" -#: main.c:115 -msgid "Can't get DBUS object name" -msgstr "" - #: ft.c:413 msgid "Can't get file size" msgstr "" @@ -666,10 +647,6 @@ msgstr "" msgid "Connect on startup" msgstr "" -#: gobject.c:205 -msgid "Connecting to host" -msgstr "" - #: connect.c:215 connect.c:311 connect.c:320 connect.c:382 connect.c:397 #: connect.c:413 connect.c:427 connect.c:447 connect.c:461 connect.c:477 #: connect.c:573 @@ -1884,11 +1861,6 @@ msgstr "" msgid "Starting" msgstr "" -#: gobject.c:193 -#, c-format -msgid "State %04d can't accept requests" -msgstr "" - #: security.c:237 msgid "Subject issuer mismatch" msgstr "" @@ -2320,11 +2292,6 @@ msgstr "" msgid "Unexpected or unknown security status" msgstr "" -#: gobject.c:208 -#, c-format -msgid "Unexpected state %04d" -msgstr "" - #: actions.c:391 #, c-format msgid "Unexpected target \"%s\"" diff --git a/src/include/pw3270/hllapi.h b/src/include/pw3270/hllapi.h index c00a52b..926d12c 100644 --- a/src/include/pw3270/hllapi.h +++ b/src/include/pw3270/hllapi.h @@ -154,9 +154,6 @@ extern "C" { HLLAPI_API_CALL hllapi_reset(void); - HLLAPI_API_CALL hllapi_get_revision(void); - HLLAPI_API_CALL hllapi_get_datadir(LPSTR datadir); - HLLAPI_API_CALL hllapi_connect(LPSTR uri, WORD wait); HLLAPI_API_CALL hllapi_disconnect(void); HLLAPI_API_CALL hllapi_get_message_id(void); @@ -192,6 +189,7 @@ extern "C" { HLLAPI_API_CALL hllapi_get_revision(void); HLLAPI_API_CALL hllapi_get_datadir(LPSTR datadir); + HLLAPI_API_CALL hllapi_set_charset(LPSTR datadir); HLLAPI_API_CALL hllapi_connect(LPSTR uri, WORD wait); HLLAPI_API_CALL hllapi_disconnect(void); diff --git a/src/libpw3270cpp/session.cc b/src/libpw3270cpp/session.cc index 7a8ee12..86ce0f6 100644 --- a/src/libpw3270cpp/session.cc +++ b/src/libpw3270cpp/session.cc @@ -222,6 +222,7 @@ trace("%s(%s,%s)",__FUNCTION__,remote,local); #ifdef HAVE_ICONV + string display_charset = this->get_display_charset(); if(this->conv2Local != (iconv_t) (-1)) @@ -243,9 +244,16 @@ } else { + // Same charset, doesn't convert conv2Local = conv2Host = (iconv_t)(-1); } +#else + + #error aqui + throw exception("%s",strerror(ENOSUP)); + + #endif } diff --git a/src/plugins/hllapi/calls.cc b/src/plugins/hllapi/calls.cc index 35bfbee..d06158c 100644 --- a/src/plugins/hllapi/calls.cc +++ b/src/plugins/hllapi/calls.cc @@ -54,6 +54,9 @@ if(hSession) delete hSession; hSession = session::create(mode); + + session::get_default()->set_display_charset(); + trace("hSession=%p",hSession); } catch(std::exception &e) @@ -239,6 +242,21 @@ return 0; } + HLLAPI_API_CALL hllapi_set_charset(LPSTR text) + { + try + { + + session::get_default()->set_display_charset(NULL, (const char *) text); + + } + catch(std::exception &e) + { + return HLLAPI_STATUS_SYSTEM_ERROR; + } + + return 0; + } HLLAPI_API_CALL hllapi_pfkey(WORD key) { diff --git a/src/pw3270/resources.rc.in b/src/pw3270/resources.rc.in index 2db5b92..4d718fe 100644 --- a/src/pw3270/resources.rc.in +++ b/src/pw3270/resources.rc.in @@ -1,8 +1,8 @@ 1 ICON @PACKAGE_NAME@.ico 2 VERSIONINFO -FILEVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@,@PACKAGE_MINOR_RELEASE@ -PRODUCTVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@,@PACKAGE_MINOR_RELEASE@ +FILEVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@ +PRODUCTVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@ BEGIN BLOCK "StringFileInfo" BEGIN @@ -14,7 +14,7 @@ BEGIN VALUE "LegalCopyright", "Copyright (c) Banco do Brasil S.A." VALUE "OriginalFilename", "@PACKAGE_NAME@.exe" VALUE "ProductName", "@PACKAGE_NAME@" - VALUE "ProductVersion", "@PACKAGE_VERSION@" + VALUE "ProductVersion", "@PACKAGE_VERSION@-@PACKAGE_MAJOR_RELEASE@.@PACKAGE_MINOR_RELEASE@" END END END -- libgit2 0.21.2