View Issue Details

IDProjectCategoryView StatusLast Update
0002319XdebugUncategorizedpublic2026-01-08 17:44
Reporterskateprokim Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.2 
Target Version3.4devFixed in Version3.4.2 
Summary0002319: emoji character become diamond question marks
Description

PHP 8.3.2.

Without Xdebug:
It shows the emoji character.

With Xdebug:
It shows diamon question marks instead of the emoji character, which is unexpected.

Steps To Reproduce

Script:
<?php
$str = 'hello X'; //replace X with an emoji
var_dump(
$str
);
?>

Additional Information

I am unable to images, as I keep getting errors.

Tagsvar_dump
Operating System
PHP Version8.3.5-8.3.9

Relationships

has duplicate 0002320 resolvedderick var_dump does not output 16 characters in Windows-1251 
related to 0002313 closedderick var_dump does not output some Russian characters 

Activities

skateprokim

2025-02-13 12:07

reporter   ~0007176

Adding the actual emoji character gives tracker error and "\xEF\xBF\xBD\x0D\x0AA" is being shown.

skateprokim

2025-02-13 12:10

reporter   ~0007177

PHP version range is wrong. I must have forgot to repick, as I had to try multiple times to create this issue.
8.3.2 is correct.

derick

2025-02-18 11:44

administrator   ~0007178

Yeah, the issue tracker still uses the old MySQL character set that doesn't use emojis.

I can't reproduce this on the command line, but curiously, I can in the browser.

For some reason, Xdebug drops the first byte of the emoji (\xf0):

Correct:

0000   73 74 72 69 6e 67 28 31 30 29 20 22 68 65 6c 6c   string(10) "hell
0010   6f 20 f0 9f 91 8d 22 0a                           o ....".

Incorrect:

0000   3c 73 6d 61 6c 6c 3e 2f 74 6d 70 2f 32 33 31 39   <small>/tmp/2319
0010   2e 70 68 70 3a 33 3a 3c 2f 73 6d 61 6c 6c 3e 3c   .php:3:</small><
0020   73 6d 61 6c 6c 3e 73 74 72 69 6e 67 3c 2f 73 6d   small>string</sm
0030   61 6c 6c 3e 20 3c 66 6f 6e 74 20 63 6f 6c 6f 72   all> <font color
0040   3d 27 23 63 63 30 30 30 30 27 3e 27 68 65 6c 6c   ='#cc0000'>'hell
0050   6f 20 9f 91 8d 27 3c 2f 66 6f 6e 74 3e 20 3c 69   o ...'</font> <i
0060   3e 28 6c 65 6e 67 74 68 3d 31 30 29 3c 2f 69 3e   >(length=10)</i>
0070   0a                                                .

derick

2025-02-18 12:39

administrator   ~0007180

https://github.com/xdebug/xdebug/pull/997

derick

2025-02-19 07:48

administrator   ~0007183

https://github.com/xdebug/xdebug/actions/runs/13402799357#artifacts

derick

2025-02-21 14:20

administrator   ~0007186

Fixed for 3.4.2