Preface:
Because the company development projects need to use the expression Plug-ins, Baidu for a long time on the internet, a lot of expression plug-ins, are required to cite a lot of JS files, there is no ready-made demo can be used, and some plug-ins are cited a lot of pictures, every expression to be asked again. For such a function, to introduce a lot of js,img, but also outweigh the gains ...
Therefore, Bo master their own code a small "expression plug-in" to facilitate the direct use o
directly from SQL without looking at the table:mysql [localhost] {msandbox} ((none)) > select CONVERT (0xe5be88e5b18c using UTF8); +-------------------------------- ----+| Convert (0xe5be88e5b18c using UTF8) |+------------------------------------+| Very dick |+------------------------------------+1 row in Set (0.00 sec)The emoji of common problem handlingThe so-called emoji is
when I met emoji. Assume that the limit is entered in 15 characters, and the 15th character if the input is emoji, the emoji does not display properly. Because emoji is a two-character size.So, here's the idea of preventing this rough truncation method.
http://stackoverflow.com/questions/15775294/ Truncate-st
| Byte 2| Byte 3| Byte 4| Byte 5| Byte 6|-|-|-|-|-|-|e5|be|88| e5| b1|8cThen apply the UTF-8 code before the introduction of the rules summarized in the chapter, it is not difficult to find that the 6-byte data conforms to the UTF-8 encoding rules. If the entire data flow conforms to this rule, we can boldly assume that the coded character set before garbled is UTF-83rd Step DecodingThen we can take the E5BE88E5B18C UTF-8 decoding, look at the text before garbled. Of course we can get results di
E5BE88E5B18C UTF-8 decoding, look at the text before garbled. Of course we can get results directly from SQL without looking at the table:Mysql[localhost]{Msandbox}((None))>select convert (0xe5be88e5b18c Span class= "K" >using utf8) | convert (0xe5be88e5b18c using span class= "n" >utf8) | +------------------------------------+| very dick | +------------------------------------+1 row in Set (0. XX sec) The emoji of common problem handlin
take the E5BE88E5B18C UTF-8 decoding, look at the text before garbled. Of course we can get results directly from SQL without looking at the table:
1234567
mysql [localhost] {msandbox} ((none)) > select convert(0xE5BE88E5B18C using utf8);+------------------------------------+| convert(0xE5BE88E5B18C using utf8) |+------------------------------------+| 很屌 |+------------------------------------+1 row in set (0.00 sec)
The emoji
I have always wanted to use crawlers to land and crawl Twitter data, tried scrapy,requests and other packages, are not successful, may be I am not familiar with the reasons, butA new package, Tweepy, was discovered today, dedicated to handling the Twitter API in Python. Try the first example of the tutorial first, after a bit of your own modificationThe code is as follows:Tweepy Crawl Twitter Data 1 import re import tweepy auth = tweepy. Oauthhandler ("xxxxx",
Display QQ and control expressions in your controls
The iPhone supports unicode emoji character set UILable, UITextView, UIWebView, and UITextField, which can be used directly and changed with the font size.
Running result:
Zookeeper code implements zookeeper:
UILabel x emoji = [[UILabelalloc] initWithFrame: CGRectMake (100,100,150,100)];
Emoji. text = @ "\ ue0
We used Unicode to welcome the use of emoji in future projects. then, the problem arises, and the backend MySQL database cannot store emoji characters. Emoji is a subset of the Unicode character set. Unicode should be widely used. how can this problem be solved? This should start from scratch. Unicode is used to solve the unified encoding of global characters. wi
It can be simply understood that UTF8MB4 is currently the largest character encoding, supporting arbitrary text.
Why would there be utf8mb4?
Since UTF8 has no problem coping with daily use, why use UTF8MB4? The lower version of MySQL supports UTF8 encoding, with a maximum character length of 3 bytes and an error if a 4-byte character is encountered. The three-byte UTF-8 maximum encoded Unicode character is 0xFFFF, which is the basic multiple plane (BMP) in Unicode. That is, any Unicode charact
.
supports Emoji Unicode 9 (Emoji Unicode 9 support): We have introduced some new character Emoji and replaced some of the general design with some more humanized Emoji icons. If you are an IME or SMS app developer, you should start adding these emoji to your app. This upd
VARIABLES where variable_name like ' character\_set\_% ' OR variable_name like ' collation% '; command to view the character setAfter the above steps are implemented, you can successfully use emoji emoticons to store the functionality of the MySQL database.————————————————————————————————————————————————————————————————Since the MySQL database needs to be backed up and restored, the. sql file with emoji ex
I read the user's nickname through the interface, but many of the names are special characters, such as these special words designators not into the MySQL database is meaningless. So I want to filter, the name of the character only the Chinese characters and numbers extracted. How to write this in PHP.
Reply content:
I read the user's nickname through the interface, but many of the names are special characters, such as these special words designators not into the MySQL database is meaningle
Clever operations on regular expressions in JS and clever operations on JS
If you don't talk much about it, paste the Code directly. The specific code is as follows:
Var msg = "dsada [emoji: 37] dsadas [emoji: 3900] farfarafen River"; function fetch (msg) {var match, result = msg, reg =/\ [emoji: \ d + \]/g, emojiIndex, totalEmojiNum = 45; while (match = reg.ex
Twitter has released its full emoji facial images of open source. Developers can go to GitHub to download the full expression Library and add these expressions to their apps or Web pages.These days in the chat project just use, record down easy to use.Call mode
HTML code
OK, this can be invoked on these two lines of code. How to display the textarea after the call, and submit to the page. Since the
1. Click on the expression
1.1 Expression Magnification interface
1.2 Realization Ideas
1> Monitor Emoji button click
2> can only display one magnifying glass at a time, create one, do not create it repeatedly
3> Magnifier should be as a whole hwemotionpopview, and relatively simple, with xib to achieve, provide class method
4> lazy Loading in Hwemotionpageview Hwemotionpopview
Note 1 : Hwemotionpopview Add location i
Tags: so the body client key XML--Encoding Method Name ToolIncorrect string value garbled problem in MySQL solutionHave you ever encountered an error similar to the following? Java.sql.SQLException:Incorrect string value: ' \xf0\x9f\x92\x9c ' for column ' content ' at row 1. The reason for this exception is that the UTF8 encoding in MySQL will store a character up to 3 bytes if the UTF8 of a character Encoding takes up 4 bytes (most commonly the emoji
recently encountered a problem in the project, find a half-day reason, finally found that the user entered the nickname Emojicon expression, resulting in the server does not recognize the error, and the project did not support the Emojicon expression, so have to consider the Emojicon expression to do the next treatment, On the internet also looked up a lot of information, finally did a summary, can let the project quickly support Emojicon expression display, and can determine whether the user in
Design ideas: Whenever the user clicks on an expression, the expression (djemotion) is stored in the sandbox, when the user switches to the "recent" column, from the sandbox to remove the user's most recently clicked Emoticon list, to display.1. Save DjemotionDJEmotion.h#import//because you want to save the most recently used emoticon to the sandbox, the object must implement the Nscoding protocol@interfaceDjemotion:nsobject /** Emotion Chinese characters*/@property (nonatomic,copy) NSString*CHS
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.