aboutsummaryrefslogtreecommitdiff
path: root/tgsend
diff options
context:
space:
mode:
authorGuillermo Ramos2019-06-28 14:35:28 +0200
committerGuillermo Ramos2019-06-28 14:35:38 +0200
commit105b36ca2c9783fb10f60994be0d93a4f1ad4767 (patch)
tree4f86e9d63496db0f2e1dd3893e0a35cb4c996850 /tgsend
parent351f3b01ab536c9084ead0ffc4f5cb5671a52e52 (diff)
downloadtgutils-105b36ca2c9783fb10f60994be0d93a4f1ad4767.tar.gz
Fix UTF-8 handling in tgsend
Diffstat (limited to 'tgsend')
-rwxr-xr-xtgsend3
1 files changed, 2 insertions, 1 deletions
diff --git a/tgsend b/tgsend
index 80458e4..a05af32 100755
--- a/tgsend
+++ b/tgsend
@@ -40,7 +40,8 @@ $TOKEN ||= fetch_token() or
# Read text from stdin
undef $/;
-my $text = join "", <STDIN>;
+binmode STDIN, ':encoding(utf8)';
+my $text = <STDIN>;
$text =~ s/^\s+|\s+$//g; # Trim input
# Send message to chats (or pretend to)