0
votes

I am using XMPP framework for develop a chat Application with OpenFire server. All things works fine only i am facing one issue that :

When user A send an 'Emoji' to User B when user B is offline then user B will get push notification through PHP Server .

when user went online i am getting all the message in

- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message

Method. It looks good but when user B receive emoji it converts in '?????' Like I'm getting This In message content:

<message xmlns="jabber:client" type="chat" to=“receiver” from=“sender”><body>????</body><delay xmlns="urn:xmpp:delay" from="52.208.58.179" stamp="2016-08-15T12:16:59.039Z"></delay></message>

Same things work well in normal text message, Don't know why i am getting "????" in offline mode.Same code working in online mode.

1
Emojis are unicode characters and you need to keep that in account while sending and receiving emoji characters.ldindu
Thanks, dude, but as i said its work fine in online mode only offline mode i am getting thisguru
Online messages are forwarded instantly to receiver. Offline messages are stored in database by OpenFire, check the datatype of your text message field in related table. Check if it supports the unicode character.Adil Soomro
Great idea @AdilSoomro if you don't mind can you explain me from where i can check datatype of my message from operfire because i am new to open fire.guru
I'm not sure about that, it might be using embedded database or external sql. You need to go through their forum to find out the location of the db. Actually we had another guy to look into it. So I myself am not sure about the location and structure.Adil Soomro

1 Answers

0
votes

You need to ensure that your database is properly configured to handle 4-Bytes unicode characters. MySQL for example need to use utf8mb4 encoding and not just utf8. This is the most common error case.