in reply to Re^2: Encoding of emoji character
in thread Encoding of emoji character

Wide character at /path/to/websocket_server line 680.
Should I be doing something different to decode what's already UTF-8? Thank you.
Well, according to the documentation, wide characters are exactly the thing you're supposed to be passing to send_utf8 (the function is a one liner that sends Encode::encode('UTF-8', $_[1])), but I don't have enough information about your code to give you advice on what to try next. The error must be somewhere around /path/to/websocket_server line 680.

You can also try to send bytes as-is using $conn->send_binary, but that may need changes on the client side.

Replies are listed 'Best First'.
Re^4: Encoding of emoji character
by dcunningham (Sexton) on Jun 20, 2022 at 21:32 UTC

    The line giving the "Wide character" error is the actual decode() line itself. Perhaps $text isn't actually already in UTF-8? But then what encoding it is in I don't know.