I am receiving emoji in the below format from a source system.
- '\u2764' for ❤
- '\ud83d\udc4d' for
I need to know how i can convert this, so it displays as Proper emoji in Unity Debug log and in Text fields. Please help me.
When I try the below code
socket = listener.Accept();
int bytesRec = socket.Receive(receiveBuffer);
data = Encoding.UTF8.GetString(receiveBuffer, 0, bytesRec);
Debug.Log(data);
I get
- '\u2764' for ❤
- '\ud83d\udc4d' for
When I try the below code
socket = listener.Accept();
int bytesRec = socket.Receive(receiveBuffer);
data = Encoding.Unicode.GetString(receiveBuffer, 0, bytesRec);
Debug.Log(data);
I get
- '畜㜲㐶' for ❤
- '畜㡤搳畜捤搴' for
Thanks Jos
The code, HTH:
Escape sequences only recognized in Python string literals are:
Usage examples: