Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

works fine with Windows Terminal:

http://0x0.st/H_S1.png

but yes to be fair, the width on those ridiculous 5 codepoint emoji is off.



Is it windows or is it golang making the difference there? Golang's implementation of wcwidth is different, and a commonly used lib has an 'emoji' table which covers that bomb (1F4A3)

https://github.com/mattn/go-runewidth/blob/master/runewidth_...

The family emoji looks to have the wrong width, but it does resemble the behaviour supposed to be fixed by https://github.com/mattn/go-runewidth/pull/63 (see https://github.com/mattn/go-runewidth/issues/59 - like the flag example, that's multiple emojis with zwj right?)


I just used the standard library, not even any imports:

https://godocs.io/builtin#println


Kitty on macOS also works fine with all cases, including the correct width.


Kitty has the wrong width: https://github.com/kovidgoyal/kitty/issues/3810

It doesn't immediately overwrite the emoji with the next character, but the cursor position is off, which leads to wrapping problems down the line.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: