Commit 66a08005c920c03fe01c404d6f8e9acce80e8127
1 parent
bcd59ddc
Exists in
master
and in
3 other branches
Extendendo tratamento de charset para a classe base para implementação de extens…
…ões, incluindo novos métodos no plugin rexx
Showing
3 changed files
with
9 additions
and
3 deletions
Show diff stats
charset.c
@@ -300,12 +300,18 @@ LIB3270_EXPORT const char * lib3270_get_default_charset(void) | @@ -300,12 +300,18 @@ LIB3270_EXPORT const char * lib3270_get_default_charset(void) | ||
300 | return "ISO-8859-1"; | 300 | return "ISO-8859-1"; |
301 | } | 301 | } |
302 | 302 | ||
303 | -LIB3270_EXPORT const char * lib3270_get_charset(H3270 *hSession) | 303 | +LIB3270_EXPORT const char * lib3270_get_display_charset(H3270 *hSession) |
304 | { | 304 | { |
305 | CHECK_SESSION_HANDLE(hSession); | 305 | CHECK_SESSION_HANDLE(hSession); |
306 | return hSession->charset.display ? hSession->charset.display : "ISO-8859-1"; | 306 | return hSession->charset.display ? hSession->charset.display : "ISO-8859-1"; |
307 | } | 307 | } |
308 | 308 | ||
309 | +LIB3270_EXPORT const char * lib3270_get_host_charset(H3270 *hSession) | ||
310 | +{ | ||
311 | + CHECK_SESSION_HANDLE(hSession); | ||
312 | + return hSession->charset.host; | ||
313 | +} | ||
314 | + | ||
309 | LIB3270_ACTION( charsettable ) | 315 | LIB3270_ACTION( charsettable ) |
310 | { | 316 | { |
311 | static const char * hChars = "0123456789ABCDEF"; | 317 | static const char * hChars = "0123456789ABCDEF"; |
html.c
@@ -244,7 +244,7 @@ | @@ -244,7 +244,7 @@ | ||
244 | 244 | ||
245 | if(option & LIB3270_HTML_OPTION_HEADERS) | 245 | if(option & LIB3270_HTML_OPTION_HEADERS) |
246 | { | 246 | { |
247 | - char *txt = xs_buffer(element_text[HTML_ELEMENT_HEADER],lib3270_get_charset(session),html_color[0]); | 247 | + char *txt = xs_buffer(element_text[HTML_ELEMENT_HEADER],lib3270_get_display_charset(session),html_color[0]); |
248 | append_string(&info,txt); | 248 | append_string(&info,txt); |
249 | lib3270_free(txt); | 249 | lib3270_free(txt); |
250 | } | 250 | } |
macros.c