frenchw / frwtwemoji Goto Github PK
View Code? Open in Web Editor NEWGet emojis (twemoji from Twitter) embed and parsed in any .net project
License: MIT License
Get emojis (twemoji from Twitter) embed and parsed in any .net project
License: MIT License
server them as script content or WebResources
When comparing local asset with the Unicode one , it doesn't seem to work.
Need to up compatibility to twemoji 2.2 at least : https://github.com/twitter/twemoji/releases/tag/v2.2.0
to get images be nicest as possible, add support, to 1em omg size
This is a tweet with a special emoji. The text 2\ufe0f\u20e3
is properly caught by the regular expression copied from Twemoji, but because it starts with the regular character '2'
, the call to char.ConvertToUtf32(char, char)
fails with an ArgumentOutOfRangeException
with the message A valid high surrogate character is between 0xd800 and 0xdbff, inclusive
.
'2'
(or the value 0x32) is definitely outside 0xd800 and 0xdbff
This happens on line 267 in Generator/Helpers.cs
As you can see by the tweet on Twitter, they have correctly replaced 2\ufe0f\u20e3
with an emoji (with the codepoint 32-20e3
), whereas FrwTwemoji will end up using an "SOS" emoji (because an exception occured)
Un caractère de substitution étendu valide est compris entre 0xd800 et 0xdbff, inclus.
Nom du paramètre : highSurrogate
Erreur source:
Ligne 263 : else
Ligne 264 : {
Ligne 265 : retval = char.ConvertToUtf32(s[0], s[1]);
Ligne 266 : }
Ligne 267 :
Fichier source : C:_Dev\GitHub\FrwTwemoji\Generator\Helpers.cs Ligne : 265
Trace de la pile:
[ArgumentOutOfRangeException: Un caractère de substitution étendu valide est compris entre 0xd800 et 0xdbff, inclus.
Nom du paramètre : highSurrogate]
System.Char.ConvertToUtf32(Char highSurrogate, Char lowSurrogate) +2716088
FrwTwemoji.Helpers.ConvertUtf16ToCodePoint(String utf16) in C:_Dev\GitHub\FrwTwemoji\Generator\Helpers.cs:265
FrwTwemoji.Parser.WebParseEmojiRegExMatchEvaluator(Match match) in C:_Dev\GitHub\FrwTwemoji\Generated\FrwTwemoji\Parser.cs:120
System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) +234
System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator, Int32 count, Int32 startat) +28
System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) +38
System.Text.RegularExpressions.Regex.Replace(String input, String pattern, MatchEvaluator evaluator) +46
FrwTwemoji.Parser.WebParseEmoji(String input) in C:_Dev\GitHub\FrwTwemoji\Generated\FrwTwemoji\Parser.cs:108
FrwTwemoji.Parser.ParseEmoji(String input, AssetSizes size, AssetTypes type, RessourcesProviders provider) in C:_Dev\GitHub\FrwTwemoji\Generated\FrwTwemoji\Parser.cs:60
TestWebApp.PageDefault.BtnRender_Click(Object sender, EventArgs e) in C:_Dev\GitHub\FrwTwemoji\Tests\TestWebApp\Default.aspx.cs:31
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.