-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using emoji #3670
Comments
Emoji's are not fully supported yet. They are not supported using They are not supported using They partially work with Use the CharacterMap scenario, and choose the Emojis Symbols range to see. Closing as a dupe of the above issues. |
I miss this scenario. Thank you for your quick answer, you save my day ! |
Also good to note that unicode sequences in-line in strings in C# are legal by this syntax, rather than having to call that converter method: string sillyString = "This strings ends with \U0001f4fa"; The case of the U is significant, as it dictates whether it interprets the following two or four bytes. Case of the hex doesn't matter. Capital U considers the next 8 following hex digits as one UTF-32 codepoint (and there must be all 8 digits, with any leading zeros included). Lower-case u considers the next 4 following hex digits ONLY, even if there are 8 digits. As with capital, all 4 must be present. Invalid code points are immediately known to the compiler as invalid and will be compile errors, which is a major advantage to doing them in-line. Examples (note: if your console font does not have the required characters, you will see one Console.WriteLine ("This line ends with the letter 'a': \u0061");
Console.WriteLine ("This line ends with the string 'e0061': \u00650061");
Console.WriteLine ("This line ends with the letter 'a': \U00000061");
//Console.WriteLine ("This line is a compiler error (invalid codepoint): \U00610065");
Console.WriteLine ("This line ends with the emoji '\ud83d\udc68': \ud83d\udc68");
Console.WriteLine ("This line ends with the emoji '\ud83d\udc68': \U0001F468"); UTF-8 is a little more cumbersome, still: Console.WriteLine (Encoding.UTF8.GetString("This line ends with the '@' symbol: \x40"u8)); |
Thank you for this explanation |
Sure thing! I learned the specifics of the 4-byte case fairly recently, myself, so it was fresh in memory. :) |
I'm trying this great repository (v 2.0.0-v2-develop.2169) but I can't managed emoji display ...
I previously checked "Unicode" scenario and even in this one I can't display this emoji: 👨
I tried with a little sample - cf. below
I'm using Windows and Visual Studio Enterprise.
In the TestWindow, the emoji is not well displayed.
Just after, using Console.WriteLine(), it's well displayed.
I guess I missed something but I don't know what.
Thank in advance
Code used:
The text was updated successfully, but these errors were encountered: