Commit 820512b30d86b6b90fc95e52028012592dc2bb90

Authored by Perry Werneck
1 parent ea427bd6

Ajustes para tratamento de charset em windows.

po/pt_BR.po
... ... @@ -5,7 +5,7 @@ msgid ""
5 5 msgstr ""
6 6 "Project-Id-Version: pw3270 5.0\n"
7 7 "Report-Msgid-Bugs-To: \n"
8   -"POT-Creation-Date: 2016-10-24 17:01-0200\n"
  8 +"POT-Creation-Date: 2016-10-24 17:44-0200\n"
9 9 "PO-Revision-Date: 2016-05-31 11:16-0300\n"
10 10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n"
11 11 "Language-Team: Português <perry.werneck@gmail.com>\n"
... ...
src/classlib/session.cc
... ... @@ -219,6 +219,8 @@
219 219 // Object settings
220 220 void session::set_display_charset(const char *remote, const char *local)
221 221 {
  222 + trace("%s(%s,%s)",__FUNCTION__,remote,local);
  223 +
222 224 #ifdef HAVE_ICONV
223 225 string display_charset = this->get_display_charset();
224 226  
... ... @@ -231,6 +233,8 @@
231 233 if(!remote)
232 234 remote = display_charset.c_str();
233 235  
  236 + trace("%s remote=%s local=%s",__FUNCTION__,remote,local);
  237 +
234 238 if(strcmp(local,remote))
235 239 {
236 240 // Local and remote charsets aren't the same, setup conversion
... ...
src/plugins/rx3270/rexx_methods.cc
... ... @@ -621,6 +621,12 @@ RexxMethod1(RexxStringObject, rx3270_method_get_display_charset, CSELF, sessionP
621 621 return context->String(ret.c_str());
622 622 }
623 623  
  624 +RexxMethod2(int, rx3270_method_set_display_charset, CSELF, sessionPtr, CSTRING, text)
  625 +{
  626 + ((session *) sessionPtr)->set_display_charset(NULL,text);
  627 + return 0;
  628 +}
  629 +
624 630 RexxMethod2(int, rx3270_method_set_unlock_delay, CSELF, sessionPtr, int, delay)
625 631 {
626 632 session *hSession = (session *) sessionPtr;
... ...
src/plugins/rx3270/rx3270.cls
... ... @@ -95,8 +95,11 @@
95 95 ::METHOD GETFILENAME EXTERNAL "LIBRARY rx3270 rx3270_method_get_filename"
96 96  
97 97 ::METHOD GETDISPLAYCHARSET EXTERNAL "LIBRARY rx3270 rx3270_method_get_display_charset"
  98 +::METHOD SETDISPLAYCHARSET EXTERNAL "LIBRARY rx3270 rx3270_method_set_display_charset"
  99 +
98 100 ::METHOD GETHOSTCHARSET EXTERNAL "LIBRARY rx3270 rx3270_method_get_host_charset"
99 101 ::METHOD SETHOSTCHARSET EXTERNAL "LIBRARY rx3270 rx3270_method_set_host_charset"
  102 +
100 103 ::METHOD SETUNLOCKDELAY EXTERNAL "LIBRARY rx3270 rx3270_method_set_unlock_delay"
101 104  
102 105 ::method waitForStringAt
... ...
src/plugins/rx3270/rx3270.h
... ... @@ -136,6 +136,7 @@
136 136 REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor_addr);
137 137 REXX_METHOD_PROTOTYPE(rx3270_method_input_text);
138 138 REXX_METHOD_PROTOTYPE(rx3270_method_get_display_charset);
  139 + REXX_METHOD_PROTOTYPE(rx3270_method_set_display_charset);
139 140 REXX_METHOD_PROTOTYPE(rx3270_method_get_host_charset);
140 141 REXX_METHOD_PROTOTYPE(rx3270_method_set_host_charset);
141 142 REXX_METHOD_PROTOTYPE(rx3270_method_set_unlock_delay);
... ...
src/plugins/rx3270/rxapimain.cc
... ... @@ -145,6 +145,8 @@ RexxMethodEntry rx3270_methods[] =
145 145 REXX_METHOD(rx3270_method_input_text, rx3270_method_input_text ),
146 146  
147 147 REXX_METHOD(rx3270_method_get_display_charset, rx3270_method_get_display_charset ),
  148 + REXX_METHOD(rx3270_method_set_display_charset, rx3270_method_set_display_charset ),
  149 +
148 150 REXX_METHOD(rx3270_method_get_host_charset, rx3270_method_get_host_charset ),
149 151 REXX_METHOD(rx3270_method_set_host_charset, rx3270_method_set_host_charset ),
150 152  
... ...