Use wcwidth instead of g_unichar_iswide
@egmontkob
Submitted by Egmont Koblinger Link to original bug (#772890)
Description
Inspired by bug 762052 and bug 772812:
Every once in a while wcwidth() and g_unichar_iswide() disagree whether a character is wide or not. This can be caused by changes in the Unicode standard (and lack of versioning in these methods), or by implementation bugs.
In order for apps running inside the terminal emulator not to fall apart, it's important that the app has the same belief about width than the terminal emulator itself.
Apps are way more likely to use the generic wcwidth() (most of the indirectly, e.g. via ncurses) than the glib-specific g_unichar_iswide().
So if we also used the generic wcwidth(), such breakages would be less frequent.
I guess the same should go for zero-width/combining chars too.