[MDEV-8157] emoji is not saving in utf8mb4_myanmar_ci Created: 2015-05-13  Updated: 2015-05-18  Resolved: 2015-05-18

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: 10.0.19
Fix Version/s: 10.0.20

Type: Bug Priority: Major
Reporter: Htain Lin Shwe Assignee: Alexander Barkov
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Mac OS X 10.10


Attachments: PNG File dbbug.png    

 Description   

I am using utf8mb4_myanmar_ci in table. It's working fine for Myanmar Unicode and can sort the correct order. However, it can store emoji text.

mysql query is like

INSERT INTO `myanmar`.`sort` (`id`, `my`) VALUES (NULL, 'ပြုံးမောင်မောင် ��');

But it only store ပြုံးမောင်မောင် and not include emoji icon.

SHOW TABLE STATUS is showing like that



 Comments   
Comment by Elena Stepanova [ 2015-05-18 ]

I installed Myanmar font on my Wheezy from fonts-sil-padauk, and it displays the text, but not emoji, so maybe it's not just MariaDB charset/collation problem (if it's a problem at all).

bar,

Do you know anything about it?

Comment by Alexander Barkov [ 2015-05-18 ]

Mr Htain Lin Shwe,

Can you please try this:

SET NAMES utf8mb4;
INSERT INTO `myanmar`.`sort` (`id`, `my`) VALUES (NULL, 'ပြုံးမောင်မောင် ��');
SELECT hex(my) FROM myanmar;

Comment by Alexander Barkov [ 2015-05-18 ]

Elena,

To check if you have emoji font, please run gnome-character-map, press Ctrl-F and search for 1F600.

I have emoji on my Fedora 21 box out of the box. Sorry, don't know how to install it on Debian.

Comment by Htain Lin Shwe [ 2015-05-18 ]

Mr Alexander Barkov ,

SET NAMES utf8mb4;
INSERT INTO `myanmar`.`sort` (`id`, `my`) VALUES (NULL, 'ပြုံးမောင်မောင် ��');
SELECT my from sort;
 

Is showing ပြုံးမောင်မောင် ?

When I run hex

SELECT hex(my) from sort;

it's showing

E18095E180BCE180AFE180B6E180B8E18099E180B1E180ACE18084E180BAE18099E180B1E180ACE18084E180BA203F

Comment by Alexander Barkov [ 2015-05-18 ]

Can you please also send output for:

SET NAMES utf8mb4;
SELECT HEX('��');
SHOW CREATE TABLE myanmar;

Comment by Htain Lin Shwe [ 2015-05-18 ]

It's showing

F09F9880

Comment by Alexander Barkov [ 2015-05-18 ]

What is the output from:

SHOW CREATE TABLE myanmar;

Also, are you getting any warnings after the INSERT query?

Comment by Htain Lin Shwe [ 2015-05-18 ]

SET NAMES utf8mb4;
INSERT INTO `myanmar`.`sort` (`id`, `my`) VALUES (NULL,'��');
SELECT hex(my) from sort;

It's showing F09F9880

But when I run

SELECT * FROM sort;

It's showing ?

SHOW CREATRE TABLE sort;

It's showing

CREATE TABLE `sort` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`my` text COLLATE utf8mb4_myanmar_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_myanmar_ci

Comment by Alexander Barkov [ 2015-05-18 ]

IF this query:

SELECT hex(my) from sort;

distplays:

F09F9880

then it means the data has been written into the table correctly.
Strange. Not sure why you're getting '?' on SELECT.

Comment by Alexander Barkov [ 2015-05-18 ]

Can you please try to run this:

SET NAMES utf8mb4;
SELECT _utf8mb4 X'F09F9880';

What does it display?

Comment by Htain Lin Shwe [ 2015-05-18 ]

Yes, it's showing F09F9880 . Data has been writing. Let me try on other collection.

Comment by Htain Lin Shwe [ 2015-05-18 ]

Oh! it's working fine.

I clear all the data and start again. It's working fine.

CREATE TABLE `sample` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`my` text COLLATE utf8mb4_myanmar_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_myanmar_ci;

SET NAMES utf8mb4;
INSERT INTO `test`.`sample` (
`my`
)
VALUES (
'��'
);
SELECT * FROM sample;

It's showing correct data.

I found a problem , it's a problem of php_myadmin and Sequel Pro.

It's working fine terminal.

Sorry for wrong report.

Comment by Alexander Barkov [ 2015-05-18 ]

Perhaps php_myadmin and Sequel Pro have some character set options so this can be properly configured.

Generated at Thu Feb 08 07:25:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.