Combining browser by thomasballinger · Pull Request #5 · jquast/wcwidth (original) (raw)

These have been merged and docs have been updated to reflect the behavior of non-zero-width combining characters and accredit the contributions. Thanks for taking the time!

The changes proposed in wcwidth-combining-browser.py has been integrated directly with wcwidth-browser.py, and various formatting (column alignment, etc.) issues have been resolved. To see the changes, make sure to run python setup.py develop once more before launching. Use the command-line option --combining to take a look.

I spent a while inspecting the discrepancies -- that some columns are not properly aligned. These are due to my terminal emulator (iTerm2, OSX) using the libc wcwidth(3) provided by the operating system, which is based on a much older unicode specification (probably Markus Kuhn's -- version 5.0).

If you pipe the output of wcwidth-browser.py to less(1) you will see that anything that renders (recognized by libc) will typically line up just fine. You may notice some are thick boxey blobs, this is because the font does not contain these codepoints and these are place-ins, but they otherwise align fine (albeit ugly).

(Also spent a while implementing static analysis code checks and adding well-formed docstrings to all of the files, which caused me to make a PR of my own prospector-dev/prospector#71)