I’m not understanding the behaviour when including unicode inside a string which is then string concatenated. The resulting string is not known when streamed into a file.
Here’s something that works: "❔ foobar" -> "❔ foobar"
This works "\u2754 foobar" -> "❔ foobar"
This doesn’t work: "❔" <> "foobar" -> �
Neither does this "\u2754" <> "foobar" -> �
You gave me fresh motivation to fix this. The fix to render of emoji in the VS Code terminal was a new Win10 feature called “Beta: Use Unicode UTF-8 for worldwide language support”. iex.bat still freezes in Powershell (no iex prompt), and it makes no difference to the command prompt. The fix works in hyper terminal too (but that’s using Powershell).
However, the issue with the behaviour of the code remains, but I can now see emojis in the terminal [baby steps] (see below).
Just a quick question. How do you find << 0xF0, 0x9F, 0x94, 0x97 >>?
<< 0x1F49A :: utf8 >> works just fine though as does using the emoji picker in Windows to paste the emoji into the VS Code editor (which was the approach I was taking).
The usual mess of conflicting results led me down the wrong path, but I’ve learnt something along the way … my actual problem was a clumsy piece of regex using class names that didn’t include the emoji bytes(?)
Unfortunately the Regex module doesn’t support the Unicode character class [:So:]. Or any other Unicode character classes. I have another lib unicode_set that has some support for Unicode character classes. But regexes not yet - soon though.