textproc/p5-Text-CharWidth 0.04nb18 NetBSD
Perl5 wrappers around wcwidth(3) and family
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- Last update
- Commit
618415630a- Categories
- textproc, perl5
- Package size
- 9.1 KiB, 18.5 KiB installed
Description
This is a module to provide equivalent feature as wcwidth(3) and wcswidth(3). This also provides mblen(3) equivalent subroutine.
mbwidth() and mbswidth() are provided subroutines corresponding wcwidth(3) and wcswidth(3) in C language. The prefix "mb" expresses that they handles "multibyte character" in C meaning, i.e., character encoding specified by LC_CTYPE locale.
These subroutines are used to get the width of characters on terminal. Though most characters have width of 1, there are exceptions. Fullwidth characters are characters with width of 2. Most of east Asian characters such as Hiragana, Katakana, Hangul, Han Ideogram are fullwidth. Combining characters are characters with width of 0. Unicode has many combining characters like diacritical marks. There are languages which need combining characters such as Thai and Vietnamese.
Thus, if you would like to format international texts on terminal, you will have to be aware of variation of character width and will want to use this module.
In the other systems
| System | Port | Version |
|---|---|---|
| NetBSD | textproc/p5-Text-CharWidth | 0.04nb18 |
| FreeBSD | textproc/p5-Text-CharWidth | 0.04_2 |
| OpenBSD | textproc/p5-Text-CharWidth | 0.04p0 |
| DragonFly | textproc/p5-Text-CharWidth | 0.04_2 |
| MidnightBSD | textproc/p5-Text-CharWidth | 0.04_2 |
| HardenedBSD | textproc/p5-Text-CharWidth | 0.04_2 |
| GhostBSD | textproc/p5-Text-CharWidth | 0.04_2 |
Install
Binary package:
pkgin install p5-Text-CharWidth
From pkgsrc:
cd /usr/pkgsrc/textproc/p5-Text-CharWidth && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 0.04nb18 |
| NetBSD 10.1 aarch64 | 0.04nb17 |
| SmartOS / illumos x86_64 | 0.04nb18 |
| macOS 15 arm64 | 0.04nb18 |