emoji

How to detect emoji as unicode in Perl?

偶尔善良 提交于 2020-01-04 21:38:45
问题 i have text file that contain emoji unicode caracter for exemple 😤, ☹️, 😔, 😅, 😃, 😉, 😜, 😍. For example the code \N{1F60D} correspond to 😍 I use recommendation as in https://perldoc.perl.org/perluniintro.html section Creating Unicode. My program must detect them and do some treatments, but if i use open(FIC1, ">$fic"); while (<FIC>) { my $ligne=$_; if( $ligne=~/\N{1F60D}/ ) {print "heart "; } } Now I do this, it work open(FIC1, ">$fic"); while (<FIC>) { my $ligne=$_; if( $ligne=~/😍/ ) {print

How to detect emoji as unicode in Perl?

你离开我真会死。 提交于 2020-01-04 21:38:01
问题 i have text file that contain emoji unicode caracter for exemple 😤, ☹️, 😔, 😅, 😃, 😉, 😜, 😍. For example the code \N{1F60D} correspond to 😍 I use recommendation as in https://perldoc.perl.org/perluniintro.html section Creating Unicode. My program must detect them and do some treatments, but if i use open(FIC1, ">$fic"); while (<FIC>) { my $ligne=$_; if( $ligne=~/\N{1F60D}/ ) {print "heart "; } } Now I do this, it work open(FIC1, ">$fic"); while (<FIC>) { my $ligne=$_; if( $ligne=~/😍/ ) {print

js转换emoji表情

隐身守侯 提交于 2020-01-03 20:04:52
// 将表情转为字符 var str="表情😀123456" function utf16toEntities(str) { var patt=/[\ud800-\udbff][\udc00-\udfff]/g; // 检测utf16字符正则 str = str.replace(patt, function(char){ var H, L, code; if (char.length===2) { H = char.charCodeAt(0); // 取出高位 L = char.charCodeAt(1); // 取出低位 code = (H - 0xD800) * 0x400 + 0x10000 + L - 0xDC00; // 转换算法 return "&#" + code + ";"; } else { return char; } }); return str; } var str01=utf16toEntities(str) console.log(str01) // 将字符转为表情 function uncodeUtf16(str){   var reg = /\&#.*?;/g;   var result = str.replace(reg,function(char){   var H,L,code;     if(char.length == 9 ){      

Storing Android Emoji in MySQL

拟墨画扇 提交于 2020-01-03 05:29:09
问题 We are storing the emoji selected by the users in text body in MySQL. We have the column looks like this `body` text CHARACTER SET utf8 COLLATE utf8_bin, Original data : <div id='mobile-question-style' style=\"font-family: 'Helvetica Neue',Helvetica,Arial; color:#333333;\">\uD83D\uDE1D\uD83D\uDE3E\uD83D\uDE3E\uD83D\uDE3A\uD83D\uDE3A\uD83D\uDE1D</div> Data in DB : <div id='mobile-question-style' style="font-family: 'Helvetica Neue',Helvetica,Arial; color:#333333;">????????????</div> But when

How can i take screenshot of rotated TextView with emoji?

守給你的承諾、 提交于 2020-01-02 09:56:23
问题 I'm trying to make a screenshot of the rotated TextView which contain emoji icons. But on resulting bitmap i see that emoji are not rotated! Why is this happening? How can i make a screenshot with rotated emoji ? What i expect: And this is what i get: I'm using this method to get screenshot of view: layout.setDrawingCacheEnabled(true); layout.buildDrawingCache(); Bitmap bitmap = null; if (layout.getDrawingCache() != null) bitmap = layout.getDrawingCache().copy(Bitmap.Config.ARGB_8888, false);

How can i take screenshot of rotated TextView with emoji?

醉酒当歌 提交于 2020-01-02 09:56:12
问题 I'm trying to make a screenshot of the rotated TextView which contain emoji icons. But on resulting bitmap i see that emoji are not rotated! Why is this happening? How can i make a screenshot with rotated emoji ? What i expect: And this is what i get: I'm using this method to get screenshot of view: layout.setDrawingCacheEnabled(true); layout.buildDrawingCache(); Bitmap bitmap = null; if (layout.getDrawingCache() != null) bitmap = layout.getDrawingCache().copy(Bitmap.Config.ARGB_8888, false);

Emoji modifiers & ZWJ sequences using Harfbuzz & Freetype in Apple Color Emoji

蹲街弑〆低调 提交于 2020-01-02 07:10:54
问题 I'm using Freetype 1.9.1 and Harfbuzz 1.7.6 to render text possibly including emoji, however I don't know how to correctly render emoji modifiers and ZWJ sequencces from Apple Color Emoji (sbix color font). I've also tried Noto Color Emoji (CBDT/CBLC color font), which works as expected, and Segoe UI Emoji (COLR/CPAL color font), which renders black & white glyphs, however it seems that support for COLR/CPAL is just being developed in Freetype and therefore is not an issue for me. Has anyone

Disable unicode replacement emoji in Android Chrome?

三世轮回 提交于 2020-01-01 04:22:27
问题 Certain unicode characters in the Miscellaneous range would be nice to use, but most phones display them as emoji and that is unwanted because then they can't be styled by CSS font declarations. I know there's a fix for iOS, but I have not found a solution for Android. Is it possible to disable them? Example: http://jsbin.com/qopiyori/1/ 回答1: Had the same problem, found the answer on another stack overflow question which worked for me: add ︎ at the end of the string with the Unicode

add custom image as Emoji in android

只愿长相守 提交于 2020-01-01 03:28:08
问题 how to add custom image as emoji in android InputMethodService. i have tried using ImageGetter imageGetter = new ImageGetter() { public Drawable getDrawable(String source) { StringTokenizer st = new StringTokenizer(str, "."); Drawable d = new BitmapDrawable(getResources(),emoticons[Integer.parseInt(st.nextToken()) - 1]); d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); return d; } }; Spanned cs = Html.fromHtml("<img src ='"+ str +"'/>", imageGetter, null);

grep for emojis in linux

丶灬走出姿态 提交于 2019-12-31 03:53:06
问题 I am trying to grep across a list of tokens that include several non-ASCII characters. I want to match only emojis, other characters such as ð or ñ are fine. The unicode range for emojis appears to be U+1F600-U+1F1FF but when I search for it using grep this happens: grep -P "[\x1F6-\x1F1]" contact_names.tokens grep: range out of order in character class https://unicode.org/emoji/charts/full-emoji-list.html#1f3f4_e0067_e0062_e0077_e006c_e0073_e007f 回答1: You need to specify the code points with