`ts.convertToBase64` does not handle emojis
See original GitHub issueBug Report
> ts.convertToBase64("📣❓")
'7aC97bOj4p2T'
> Buffer.from("📣❓").toString("base64")
'8J+To+Kdkw=='
🔎 Search Terms
- ts.convertToBase64
- emojis
🕗 Version & Regression Information
Probably a long time.
⏯ Playground Link
N/A
💻 Code
ts.convertToBase64("📣❓")
🙁 Actual behavior
7aC97bOj4p2T
🙂 Expected behavior
8J+To+Kdkw==
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to base64 encode emojis in JavaScript? - Stack Overflow
You can encode it by escaping it first and then calling EncodeUriComponent on it. This looks like this:.
Read more >Manage emoji preferences - Slack
There are a few preferences for managing how emoji display in Slack: Display emoji as Unicode or plain text; Choose to make emoji...
Read more >Emojis and Accessibility: The Dos and Don'ts of Including ...
Don'ts. Don't repeat an emoji over and over;; Don't place emojis throughout a message;; Don't put a call to action after the emoji....
Read more >13 Do's and Don'ts of Using Emojis on Social Media
Emojis are everywhere. From texting to marketing to even home decor, you can't seem to go a day without seeing them.
Read more >Emojis and accessibility: How to use them properly
Who doesn't love emojis? I'm willing to bet that the recent 10 messages you sent or received from different people on your phone,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Gotcha, we can make the fallback implementation as slow as needed
By the way, when running on Node it uses
ts.sys.base64encode
, which usesBuffer.from(...).toString("base64")
. So only non-Node environments are affected (issue doesn’t happen with tsc on Node).