Home

Is there a way to see emojis in the results view?

My users will put all kinds of crazy characters in their profiles, and emojis are particularly popular.

Out of the box, such data shows up as a "question mark inside a diamond" character when I query my database. Is there a way to show the actual emoji? I tried using the custom CSS option to change the font, but that didn't seem to help.

Comments

  • LINQPad will correctly escape most Unicode characters, but you'll need to tell LINQPad to use a font that supports them.

    You can control the font in Edit | Preferences | Results > Style Sheet, by adding the follow customization:

    body,p,pre { font-family: xxxxxxxx }

  • edited March 2017
    I tried several fonts including "Segoe UI Emoji". I get that question mark box in the Rich Text view no matter what font I try, but I do see the emojis in the Data Grid View.

    I did some reading and I viewed the HTML source of the Rich Text view, and I see the � character reference a lot, which I guess is a UTF-16 thing? But the Rich Text view is UTF-8.

    Does linqpad need to do a little extra work when escaping these character references? Maybe this is a known shortcoming you implied when you said "most"?

    For example, the Dagger at code point U+1F5E1 could appear in html as "🗡" or "🗡", but linqpad outputs "��️"

    I imagine something like this is at the bottom of your priorities but if you could fix it... that would be killer
  • edited March 2017
    Ah, you're using Unicode characters outside the BMP. LINQPad doesn't support this right now. There may be a fix in the next beta build, depending on how much work it is.
  • If it's not too much work, I would love to see support for this! Regardless, thank you for responding, and thanks for the great software. It's one of my favorite tools.
  • Try now, with the latest beta.
  • I'm sorry I missed your message but I see it in the latest version! Works perfectly! Thank you!
Sign In or Register to comment.