node-emoji icon indicating copy to clipboard operation
node-emoji copied to clipboard

🏴󠁧󠁢󠁥󠁮󠁧󠁿 🏴󠁧󠁢󠁳󠁣󠁴󠁿 england, scotland flags are not decoded even if their unicode values are mentioned in emojifile.js

Open Dhanraj-Naik opened this issue 3 years ago • 1 comments

Hi i am getting :waving_black_flag: when i add flag-england(🏴󠁧󠁢󠁥󠁮󠁧󠁿) or flag-scotland(🏴󠁧󠁢󠁳󠁣󠁴󠁿) or flag-wales(🏴󠁧󠁢󠁷󠁬󠁳󠁿) when i unemojify. so again when i do emojify that :waving_black_flag: string, i am getting following output: OUTPUT: 🏴?????????????????????????.

Why 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🏴󠁧󠁢󠁳󠁣󠁴󠁿 flags are not decoded even if their codes are mentioned in emojifile.js?

Platform: React Native 63.0.+ Node.js v14.15.5 "node-emoji": "1.10.0".

Any suggestions?

Dhanraj-Naik avatar Mar 06 '21 08:03 Dhanraj-Naik

i think the issue is with lodash toArray method here which is used inside emoji.js file to unemojify string to array. Screenshot 2021-03-06 at 3 42 17 PM

That is: _.toArray('🏴󠁧󠁢󠁥󠁮󠁧󠁿'); outputs as: ["🏴", "󠁧", "󠁢", "󠁥", "󠁮", "󠁧", "󠁿"]

Any help here will be much appreciated. Thank you

Dhanraj-Naik avatar Mar 06 '21 10:03 Dhanraj-Naik

👋 Looks like this behavior was changed -potentially fixed?- when v2 switched to using emojilib (#113):

import * as emoji from "node-emoji";

console.log(emoji.unemojify("🏴󠁧󠁢󠁥󠁮󠁧󠁿"));
:england:

Note that we're also looking at upgrading to emojilib v3 (#132). So I'll close this issue out as no longer relevant. Cheers!

JoshuaKGoldberg avatar May 20 '23 15:05 JoshuaKGoldberg