in reply to Re^3: Encoding of emoji character
in thread Encoding of emoji character
Thanks for that. If I use $text = "Test \N{GRINNING FACE}" in my program then the websocket client displays the emoji correctly. I modified your sample code a little and it gave the following output.
With the $text = "Test \N{GRINNING FACE}" for the emoji it gives:
$VAR1 = "\x{1f600}"; 128512 GRINNING FACE
Using the string read from MySQL the emoji gives:
240 LATIN SMALL LETTER ETH $VAR1 = '�'; 159 APPLICATION PROGRAM COMMAND $VAR1 = '�'; 152 START OF STRING $VAR1 = '�'; 128 PADDING CHARACTER
Changing the database to UTF-8 will be difficult as it's not entirely under our control. Do you think the table being latin1 is the problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Encoding of emoji character
by soonix (Chancellor) on Jun 21, 2022 at 18:47 UTC | |
by dcunningham (Sexton) on Jun 22, 2022 at 03:37 UTC | |
|
Re^5: Encoding of emoji character
by Anonymous Monk on Jun 21, 2022 at 06:09 UTC | |
by soonix (Chancellor) on Jun 21, 2022 at 18:52 UTC | |
by dcunningham (Sexton) on Jun 22, 2022 at 03:40 UTC |