shorten_utf8 with 4 bytes character
Database management in a single PHP file
Brought to you by:
jakubvrana
Hello,
The PHP function shorten_utf8 does not work well with this UTF8 4 bytes character : http://www.fileformat.info/info/unicode/char/1F4A9/index.htm
shorten_utf8('💩') returns '...' insteadof '💩'
Sorry for this character but it's coming from one of my client!
Best,
If you need some data to test
SET NAMES utf8mb4;
DROP TABLE IF EXISTS
test;CREATE TABLE
test(test2int(11) NOT NULL AUTO_INCREMENT,test1text COLLATE utf8mb4_unicode_ci NOT NULL,test3char(5) COLLATE utf8mb4_unicode_ci NOT NULL,test4varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL,PRIMARY KEY (
test2)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO
test(test2,test1,test3,test4) VALUES(10, '💩', '', '');
Fixed by https://github.com/vrana/adminer/commit/63b6b993. Hopefully it doesn't break with older PCRE versions.
Thank you !