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
- 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 ( LFas 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_widtharguments are now clamped to allowed range (1, 2), PR #246.Changed wrap() now raises
ValueErrorfor a width of zero or less, matching stdlibtextwrap. Previouslywrap('女', 0)returned['女'], PR #246.Changed clip() arguments
start=0andend=-1become optional, PR #250.Updated tables for Unicode version 18.0, PR #238.
Updated
ucs-detectdata files used in some automatic tests are no longer distributed, PR #253.
- 0.8.3 2026-08-28
Bugfix Do not hang on wrap() calls of width 1 with text containing OSC8 hyperlinks and wide characters, PR #231.
Bugfix clip() with
propagate_sgr=True, should match behavior of propagate_sgr(), PR #235.
- 0.8.2 2026-06-29
Bugfix Do not raise IndexError when legacy POSIX
nargument to wcswidth() or wcstwidth() exceeds the given string length. PR #230
- 0.8.1 2026-06-08
Improved wcstwidth() with new
zeroer,narrow_wider, andnarrow_zeroerCorrections. PR #226
- 0.8.0 2026-06-05
New support for Variation Selector 15 Emojis as narrow, Issue #211.
New argument,
term_programfor wcstwidth(), width(), clip(), wrap(), ljust(), rjust(), and center().Falsedisables Corrections;Trueauto-detects byTERM_PROGRAMorTERM; string values accept canonical names matching list_term_programs(). wcstwidth() defaults toTrue; all other functions default toFalse.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 raiseValueErrorwhencontrol_codes='strict'.
- 0.6.0 2026-02-06
New Parameters
expand_tabs,replace_whitespace,fix_sentence_endings,drop_whitespace,max_lines, andplaceholderfor wrap(), completing stdlib textwrap.wrap() compatibility.
- 0.5.3 2026-01-30
Bugfix Brahmic using Virama conjunct formation. Issue #155, PR #204.
- 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
New Functions iter_graphemes_reverse(), grapheme_boundary_before(). PR #192.
Bugfix OSC Hyperlinks should not be broken by wrap(). PR #191.
- 0.3.5 2026-01-24
Bugfix packaging of 0.3.4 contains a failing test.
- 0.3.4 2026-01-24
Bugfix center() should match the eccentric parity padding. of str.center(). PR #188.
- 0.3.3 2026-01-24
- 0.3.2 2026-01-23
Updated type hinting for full
mypy --strictcompliance. PR #183.
- 0.3.1 2026-01-22
- 0.3.0 2026-01-21
Drop Support for Python 3.6 and 3.7. PR #156.
New Function iter_graphemes(). PR #165.
New Functions width() and iter_sequences(). PR #166.
Performance improvement in wcswidth(). PR #171.
New argument
ambiguous_widthto all functions. PR #172.New Functions clip() and strip_sequences(). PR #173.
Bugfix Characters with
Default_Ignorable_Code_Pointproperty now return width 0. PR #174.Bugfix Characters with
Prepended_Concatenation_Markproperty now return width 1. PR #175.
- 0.2.14 2025-09-22
- 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
- 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, andtox.iniin 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 as13.0, or6.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
LICENSEfile 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_combis no longer available, it has been superseded by module pathwcwidth.table_zero.
- 0.1.4 2014-11-20 Pre-Alpha
Feature:
wcswidth()now determines printable length for (most) combining characters. The developer’s tool bin/wcwidth-browser.py is improved to display combining characters when provided the--combiningoption (Thomas Ballinger and Leta Montopoli PR #5).Feature: added static analysis (prospector) to testing framework.
- 0.1.3 2014-10-29 Pre-Alpha
Bugfix: 2nd parameter of wcswidth was not honored. (Thomas Ballinger, PR #4).
- 0.1.2 2014-10-28 Pre-Alpha
Updated tables to Unicode Specification 7.0.0. (Thomas Ballinger, PR #3).
- 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.