mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 16:53:14 +02:00
perl: fix display of non-ASCII chars after load of a script with Perl >= 5.38 (closes #1996)
This commit is contained in:
@@ -47,6 +47,7 @@ Bug fixes::
|
|||||||
* irc: add missing tags on multiline messages (issue #1987)
|
* irc: add missing tags on multiline messages (issue #1987)
|
||||||
* irc: fix redirection of command `/list` when the reply doesn't start with message 321 (start of /list)
|
* irc: fix redirection of command `/list` when the reply doesn't start with message 321 (start of /list)
|
||||||
* irc: fix wrong time displayed for CTCP messages received from self nick (issue #2000)
|
* irc: fix wrong time displayed for CTCP messages received from self nick (issue #2000)
|
||||||
|
* perl: fix display of non-ASCII chars after load of a script with Perl >= 5.38 (issue #1996)
|
||||||
* relay: synchronize nick modes with IRC client upon connection (issue #1984)
|
* relay: synchronize nick modes with IRC client upon connection (issue #1984)
|
||||||
* script: fix cursor position after `/script list -i` or `/script list -il`
|
* script: fix cursor position after `/script list -i` or `/script list -il`
|
||||||
* script: fix buffer used by command `/script list -i|-il|-o|-ol`
|
* script: fix buffer used by command `/script list -i|-il|-o|-ol`
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#undef _
|
#undef _
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
#include <EXTERN.h>
|
#include <EXTERN.h>
|
||||||
#include <perl.h>
|
#include <perl.h>
|
||||||
#include <XSUB.h>
|
#include <XSUB.h>
|
||||||
@@ -567,6 +568,10 @@ weechat_perl_load (const char *filename, const char *code)
|
|||||||
temp_script.interpreter = (PerlInterpreter *) perl_current_interpreter;
|
temp_script.interpreter = (PerlInterpreter *) perl_current_interpreter;
|
||||||
perl_parse (perl_current_interpreter, weechat_perl_api_init,
|
perl_parse (perl_current_interpreter, weechat_perl_api_init,
|
||||||
perl_args_count, perl_args, NULL);
|
perl_args_count, perl_args, NULL);
|
||||||
|
#if PERL_REVISION >= 6 || (PERL_REVISION == 5 && PERL_VERSION >= 38)
|
||||||
|
/* restore the locale that could be changed by Perl >= 5.38 */
|
||||||
|
Perl_setlocale (LC_CTYPE, "");
|
||||||
|
#endif
|
||||||
length = strlen (perl_weechat_code) + strlen (str_warning) +
|
length = strlen (perl_weechat_code) + strlen (str_warning) +
|
||||||
strlen (str_error) - 2 + 4 + strlen ((code) ? code : filename) + 4 + 1;
|
strlen (str_error) - 2 + 4 + strlen ((code) ? code : filename) + 4 + 1;
|
||||||
perl_code = malloc (length);
|
perl_code = malloc (length);
|
||||||
@@ -1290,6 +1295,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
|||||||
perl_construct (perl_main);
|
perl_construct (perl_main);
|
||||||
perl_parse (perl_main, weechat_perl_api_init, perl_args_count,
|
perl_parse (perl_main, weechat_perl_api_init, perl_args_count,
|
||||||
perl_args, NULL);
|
perl_args, NULL);
|
||||||
|
#if PERL_REVISION >= 6 || (PERL_REVISION == 5 && PERL_VERSION >= 38)
|
||||||
|
/* restore the locale that could be changed by Perl >= 5.38 */
|
||||||
|
Perl_setlocale (LC_CTYPE, "");
|
||||||
|
#endif
|
||||||
#endif /* MULTIPLICITY */
|
#endif /* MULTIPLICITY */
|
||||||
|
|
||||||
perl_data.config_file = &perl_config_file;
|
perl_data.config_file = &perl_config_file;
|
||||||
|
|||||||
Reference in New Issue
Block a user