mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
70_Jabber: fixed UTF8 encoding/decoding of messages
git-svn-id: https://svn.fhem.de/fhem/trunk@6323 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ef5d0dfea8
commit
56bacbfe4f
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 70_Jabber: fixed UTF8 encoding/decoding of messages
|
||||
- feature: 10_OWServer autocreate coexists with OWXXX modules (Boris & ntruchsess)
|
||||
- feature: added 36_Level.pm
|
||||
- feature: netatmo: added plz support for public stations
|
||||
|
@ -22,9 +22,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Version: 1.0 - 2014-04-10
|
||||
# Version: 1.1 - 2014-07-28
|
||||
#
|
||||
# Changelog:
|
||||
# v1.1 2014-07-28 Added UTF8 encoding / decoding to Messages
|
||||
# v1.0 2014-04-10 Stable Release - Housekeeping & Add to SVN
|
||||
# v0.3 2014-03-19 Fixed SetPresence() & Added extensive debugging capabilities by setting $debug to 1
|
||||
# v0.2 2014-01-28 Added SSL option in addition to TLS
|
||||
@ -104,6 +105,7 @@ sub Jabber_Set_Message($@)
|
||||
{
|
||||
my ($hash,$dst,@tmpMsg) = @_;
|
||||
my $message = join(" ", @tmpMsg);
|
||||
utf8::decode($message);
|
||||
if (Jabber_CheckConnection($hash)) {
|
||||
$hash->{JabberDevice}->MessageSend(to=>$dst,
|
||||
subject=>"",
|
||||
@ -414,6 +416,7 @@ sub Jabber_INC_Message {
|
||||
|
||||
my $sender = $xmpp_message->GetFrom();
|
||||
my $message = $xmpp_message->GetBody();
|
||||
utf8::encode($message);
|
||||
Log 0, "$hash->{NAME} INC_Message: $sender: $message\n" if $debug;
|
||||
my $JID = new Net::Jabber::JID($sender);
|
||||
my $senderShort = $JID->GetJID("base");
|
||||
|
Loading…
x
Reference in New Issue
Block a user