Code Monkey home page Code Monkey logo

frwtwemoji's People

Contributors

frenchw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

meai

frwtwemoji's Issues

There are still highSurrogate errors on some variant characters

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

Some emojis use regular ASCII characters, which causes ArgumentOutOfRangeException

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.