Programmatically tell if a Unicode character takes up more than one character space in a terminal

后端 未结 3 783
失恋的感觉
失恋的感觉 2020-12-10 05:03

I discovered that in the Mac OS X Terminal, some Unicode characters take up more than one character space. For example 27FC (long rightwards arrow from bar). It prints two

3条回答
  •  自闭症患者
    2020-12-10 05:47

    This is a bug in the OS X terminal.

    I wouldn't recommend trying to work around it, because it will break on other systems (e.g. Linux), and it might get fixed eventually on the Mac. It will also confuse anyone that pastes into another applicaton.

提交回复
热议问题