med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

359
active users

#utf8

0 posts0 participants0 posts today

Hey everyone. I must admit, I don't believe I have ever seen someone enter #utf8 #unicode characters on a #computer in a natural way. Which seems weird, because a bunch of languages use them.

I wrote a #commonLisp #asdf package that just looks up a list of symbols in a file that has every non-surrogate unicode codepoint in it, and an #emacs #elisp function that just calls the #lisp one.

codeberg.org/tfw/unicode-chars

Multilingual people, what can you tell me about doing this at all?

There are three #UTF8 characters (2 symbols, 1 emoji) for old-stye telephones: ☎, ☏, ☎️.

1. On some systems "black telephone" renders as the "red telephone" emoji instead of as the expected winding/dingbat-style character I was expecting. This seems system- and application-specific.

2. Depending on font, the "white telephone" may not match the height or midline of other letters or even ☎/☎️. The "black flag" ⚑ is often even worse.

Not huge deals, but created some formatting issues today.

wow i think i actually managed to get utf8 working in my VM? i used `setlocale(LC_ALL, ".UTF8")` and then print the UTF32 char 0x0107 ć from my program. the interpreter uses c32rtomb to convert it to UTF8 and then i fwrite that to stdout

but the character doesn't show up in the windows console cause windows is bad. but i figured out a workaround! i put this in my run.bat file:

set run=./bismuth.exe prog.bst
powershell $OutputEncoding = [Console]::InputEncoding = [Console]::OutputEncoding = New-Object System.Text.UTF8Encoding; %run%

and it runs the VM through powershell with powershell forced to use UTF8 and then it works somehow, yay! more bizarrely, it doesn't show me the powershell prompt but the regular command prompt, but it works anyway? idk why but i'll take the win!

also i have no idea if any of this is the right way to do things so, yanno, don't take this as a tutorial or anything