wcwidth-verifier is a tool for testing console column widths of Unicode codepoints.
It compares wcwidth predictions versus what the Windows Console Screen Buffer APIs report as actually used by the Windows Console subsystem.
The motivation was to help Clink more accurately predict how terminal programs on Windows will render text. Hopefully it will help lead to an improved customized version of wcwidth on Windows that more accurately predicts column widths of codepoints on Windows.
- Either build the tool, or download the .zip file from Releases and extract files into a local directory.
- Run
wcwv.exe --help
in the local directory to display usage help.
This tool is meant for use by programmers familiar with Unicode, wcwidth, graphemes, terminal programs, console APIs, etc. It isn't useful to other people.
The tool uses Premake to generate Visual Studio solutions. Note that Premake >= 5.0.0-beta1 is required.
You might be able to generate MinGW makefiles with premake5 gmake
, but I won't support MinGW for this tool.
cd
to your clone of the wcwidth-verifier repo.- Run
premake5.exe toolchain
(where toolchain is one of Premake's actions - seepremake5.exe --help
) - Build scripts will be generated in
.build\toolchain
. For example.build\vs2022\wcwidth-verifier.sln
. - Call your toolchain of choice (VS, msbuild.exe, etc).
To update the Unicode data files:
- Download new Unicode data files from the addresses in the README.md file in the
unicode\
subdirectory, and save the files into that directory. - Run
premake5.exe tables
to generate updated *.i data files. - See Building the Tool.
Source code here uses either the MIT license or unless otherwise stated in a file.
The .txt files in the unicode\
subdirectory were downloaded from the Unicode site; refer to the README.md file in that directory for links.