History

0.9.3 unreleased
0.9.2 2026-10-04
  • Bugfix wrap() should omit an empty line as output, like textwrap.wrap() PR #291.

  • Bugfix clip() when using non-default argument, tabsize=0, PR #288.

  • Bugfix regional-indicator pairs (flags) when corrected for terminals that show lone regional indicators as narrow (xterm, wezterm, VTE, and others) in wcstwidth() and width(), PR #284.

0.9.1 2026-09-23
  • Bugfix width() in Python and libwcwidth mis-measured CSI sequences over 64 bytes, a 0.9.0 release regression! PR #272.

  • Performance improvement of ~15% for many Python API functions when using default arguments like ambiguous_width and term_program. PR #273

0.9.0 2026-09-23
  • New Optional CPython extension using libwcwidth, improving performance 10-58x PR #248.

  • Drop Support for Python 3.8, PR #248.

0.8.5 2026-09-23
0.8.4 2026-09-17
  • Bugfix clip() hangs with OSC 8 hyperlinks in some conditions, PR #252.

  • Bugfix width of ITU T.416 colon-format SGR color parameters, PR #243.

  • Bugfix width of OSC 66 text sizing sequences without a text field, PR #246.

  • Bugfix width(), ljust(), rjust(), center(), clip() and strip_sequences() treated ESC ( LF as text instead of a character set designation (rare), PR #259.

  • Bugfix clip() painter’s algorithm and “tab expansion” should be spaces, PR #259.

  • Changed iter_graphemes() clustering rule GB9c for Unicode 18.0, PR #238.

  • Changed ambiguous_width arguments are now clamped to allowed range (1, 2), PR #246.

  • Changed wrap() now raises ValueError for a width of zero or less, matching stdlib textwrap. Previously wrap('女', 0) returned ['女'], PR #246.

  • Changed clip() arguments start=0 and end=-1 become optional, PR #250.

  • Updated tables for Unicode version 18.0, PR #238.

  • Updated ucs-detect data files used in some automatic tests are no longer distributed, PR #253.

0.8.3 2026-08-28
0.8.2 2026-06-29
0.8.1 2026-06-08
0.8.0 2026-06-05
  • New support for Variation Selector 15 Emojis as narrow, Issue #211.

  • New argument, term_program for wcstwidth(), width(), clip(), wrap(), ljust(), rjust(), and center(). False disables Corrections; True auto-detects by TERM_PROGRAM or TERM; string values accept canonical names matching list_term_programs(). wcstwidth() defaults to True; all other functions default to False.

  • Improved performance on Python 3.15 using standard library iter_graphemes() PR #206.

  • Improved memory usage and import time for Python 3.15 using lazy imports PR #221.

  • Bugfix Invisible_Stacker viramas now form conjuncts (Burmese, Khmer, etc.) and change some Virama width calculations to match jacobsandlund/uucode (ghostty) PR #223.

  • Updated graphemes width maximum now 2, matching Ghostty, foot, and Windows Terminal PR #224.

0.7.0 2026-05-02
  • New support for kitty text sizing protocol (OSC 66) in width() and clip().

  • New clip() parameter control_codes='parse', 'ignore', and 'strict'. clip() is now able to clip OSC 8 hyperlinks and OSC 66 text sizing sequences.

  • Improved clip() and width() to support horizontal cursor sequences (cub, cuf, hpa). Cursor-left (cub) or backspace (\b) now overwrites text. column_address (hpa) and carriage return (\r) are now parsed, and more values conditionally raise ValueError when control_codes='strict'.

0.6.0 2026-02-06
  • New Parameters expand_tabs, replace_whitespace, fix_sentence_endings, drop_whitespace, max_lines, and placeholder for wrap(), completing stdlib textwrap.wrap() compatibility.

0.5.3 2026-01-30
0.5.2 2026-01-29
  • Bugfix Measurement of category Mc (Spacing Combining Mark), approx. 443, has a more nuanced specification, and may be categorized as either zero or wide. PR #200.

  • Bugfix Measurement of “standalone” modifiers and regional indicators, PR #202.

  • Updated Data files used in some automatic tests are no longer distributed. PR #199

0.5.1 2026-01-27
  • Updated generated zero and wide code tables to length of 1 to complete the previously announced removal of historical wide and zero tables. PR #196.

0.5.0 2026-01-26
  • Drop Support of many historical versions of wide and zero unicode tables. Only the latest Unicode version (17.0.0) is now shipped. The related unicode_version='auto' keyword of the wcwidth() family of functions are ignored. list_versions() always returns a tuple of only a single element of the only unicode version supported. PR #195.

  • Performance improvement of most common call without version or ambiguous_width specified by 20%. PR #195.

  • New Function propagate_sgr() for applying SGR state propagation to a list of lines. PR #194.

  • Improved wrap() and clip() with propagate_sgr=True. PR #194.

  • Bugfix clip() zero-width characters at clipping boundaries. PR #194.

  • Bugfix OSC Hyperlinks when broken mid-text by wrap(). PR #193.

0.4.0 2026-01-25
0.3.5 2026-01-24
  • Bugfix packaging of 0.3.4 contains a failing test.

0.3.4 2026-01-24
0.3.3 2026-01-24
0.3.2 2026-01-23
  • Updated type hinting for full mypy --strict compliance. PR #183.

0.3.1 2026-01-22
0.3.0 2026-01-21
0.2.14 2025-09-22
  • Drop Support for Python 2.7 and 3.5. PR #117.

  • Update tables to include Unicode Specifications 16.0.0 and 17.0.0. PR #146.

  • Bugfix U+00AD SOFT HYPHEN should measure as 1, versions 0.2.9 through 0.2.13 measured as 0. PR #149.

0.2.13 2024-01-06
  • Bugfix zero-width support for Hangul Jamo (Korean)

0.2.12 2023-11-21
  • Bugfix Re-release to remove .pyi files misplaced in wheel Issue #101.

0.2.11 2023-11-20
  • Updated Include tests files in the source distribution (PR #98, PR #100).

0.2.10 2023-11-13
  • Bugfix accounting of some kinds of emoji sequences using U+FE0F Variation Selector 16 (PR #97).

  • Updated specification.

0.2.9 2023-10-30
  • Bugfix zero-width characters used in Emoji ZWJ sequences, Balinese, Jamo, Devanagari, Tamil, Kannada and others (PR #91).

  • Updated to include specification of character measurements.

0.2.8 2023-09-30
  • Include requirements files in the source distribution (PR #82).

0.2.7 2023-09-28
  • Updated tables to include Unicode Specification 15.1.0.

  • Include bin, docs, and tox.ini in the source distribution

0.2.6 2023-01-14
  • Updated tables to include Unicode Specification 14.0.0 and 15.0.0.

  • Changed developer tools to use pip-compile, and to use jinja2 templates for code generation in bin/update-tables.py to prepare for possible compiler optimization release.

0.2.1 .. 0.2.5 2020-06-23
  • Repository changes to update tests and packaging issues, and begin tagging repository with matching release versions.

0.2.0 2020-06-01
  • Enhancement: Unicode version may be selected by exporting the Environment variable UNICODE_VERSION, such as 13.0, or 6.3.0. See the jquast/ucs-detect CLI utility for automatic detection.

  • Enhancement: API Documentation is published to readthedocs.io.

  • Updated tables for all Unicode Specifications with files published in a programmatically consumable format, versions 4.1.0 through 13.0

0.1.9 2020-03-22
  • Performance optimization by Avram Lubkin, PR #35.

  • Updated tables to Unicode Specification 13.0.0.

0.1.8 2020-01-01
  • Updated tables to Unicode Specification 12.0.0. (PR #30).

0.1.7 2016-07-01
  • Updated tables to Unicode Specification 9.0.0. (PR #18).

0.1.6 2016-01-08 Production/Stable
  • LICENSE file now included with distribution.

0.1.5 2015-09-13 Alpha
  • Bugfix: Resolution of “combining character width” issue, most especially those that previously returned -1 now often (correctly) return 0. resolved by Philip Craig via PR #11.

  • Deprecated: The module path wcwidth.table_comb is no longer available, it has been superseded by module path wcwidth.table_zero.

0.1.4 2014-11-20 Pre-Alpha
0.1.3 2014-10-29 Pre-Alpha
0.1.2 2014-10-28 Pre-Alpha
0.1.1 2014-05-14 Pre-Alpha
  • Initial release to pypi, Based on Unicode Specification 6.3.0

This code was originally derived directly from C code of the same name, whose latest version is available at https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c:

* Markus Kuhn -- 2007-05-26 (Unicode 5.0)
*
* Permission to use, copy, modify, and distribute this software
* for any purpose and without fee is hereby granted. The author
* disclaims all warranties with regard to this software.