I have an older Debian server and a local install of Wordpress; I'm trying to track down why calling:
echo json_encode('😀');
on the Debian server results in "\ud83dde00"
but on my local install, calling the same json_encode
line results in "\ud83d\ude00"
(which is what I'd expect to see on the Debian server too)...
Both versions of php are compiled with mbstring=all
enabled, and both use libmbfl version 1.3.2
./configure --prefix=/usr/local/php5.6.33 --disable-all --with-libxml-dir=/usr/include/libxml2/libxml --with-openssl --with-pcre-regex --with-zlib --with-curl --enable-ftp --with-jpeg-dir --with-png-dir --with-xpm-dir --enable-mbstring=all --with-iconv --with-mysql --with-pear --enable-filter --enable-xml --enable-libxml --enable-simplexml --enable-hash --enable-dom --enable-ctype --with-gd=/usr/local
so I'm guessing it must be some other older system library that's at fault? – jaygooby Apr 18 '18 at 10:32\ud83dde00
as a value is? Is that UTF16 instead of UTF8? – jaygooby Apr 18 '18 at 10:33