mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
Fix utf8 encoding issue with code-factoids?
This commit is contained in:
parent
356efe0a8a
commit
1b13f00503
@ -697,6 +697,11 @@ sub execute_code_factoid_using_vm {
|
|||||||
$h{'persist-key'} = $self->{factoids}->hash->{$stuff->{channel}}->{$stuff->{keyword}}->{'persist-key'};
|
$h{'persist-key'} = $self->{factoids}->hash->{$stuff->{channel}}->{$stuff->{keyword}}->{'persist-key'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# not sure why we need this here, but it seems to stop strange
|
||||||
|
# text encoding issues in the following encode_json call
|
||||||
|
use Encode;
|
||||||
|
$h{arguments} = decode('utf8', $h{arguments});
|
||||||
|
|
||||||
my $json = encode_json \%h;
|
my $json = encode_json \%h;
|
||||||
|
|
||||||
$stuff->{special} = 'code-factoid';
|
$stuff->{special} = 'code-factoid';
|
||||||
|
Loading…
Reference in New Issue
Block a user