Perl Net :: Jabber :: Bot new line

I use the Net::Jabber::Bot module in my Perl script and it works correctly, but one problem is that when I want to send a message, all new lines are deleted! Two questions:

  • How can we have new lines in our posts? Should we disable chomp somewhere?
  • What happens to newlines in Jabber / XMPP?
+6
source share
1 answer

This is a known issue, someone has already submitted a fix for this: http://code.google.com/p/perl-net-jabber-bot/issues/detail?id=24

You cannot send \ n directly, but perhaps you can send a new line encoded with xmpp / jabber if this code does not contain non-printable characters.

In this section:

 sub _send_individual_message { ... # Strip out anything that not a printable character # Now with unicode support? $message_chunk =~ s/[^[:print:]]+/./xmsg; 
+3
source

All Articles