Improve handling of combining characters by philipc · Pull Request #11 · jquast/wcwidth (original) (raw)

philipc

This addresses issue #10

@philipc

@philipc

Previously, the canonical combining class was used to determine which characters are zero width combining characters. This had two problems:

Fix by using the general category to generate a table of combining characters that have zero width. Characters with a general category of Mn or Me are included in this table. Characters with a general category of Mc are not included, and so use the default width of 1.

@jquast

This is Fantastic work @philipc !

I will Changelog and release soon!

@jquast

Finished review, very great work, thank you so much !

jquast added a commit that referenced this pull request

Sep 14, 2015

@jquast

This was referenced

Sep 14, 2015

@philipc

Thanks for the review and merge.

I should have mentioned that I left the COMBINING table in because the scripts in bin needed it still. I agree that we should remove it from the main library, but I wasn't sure of the best way to do that and keep the test scripts working.