tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: UTF-8 capable fmt(1)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 09.01.2016 01:03, David Young wrote:
> On Sat, Jan 09, 2016 at 12:58:25AM +0100, Thomas Klausner wrote:
>> I suggest we follow the lead of other and replace our 30 year old
>> fmt with a 15 year old one :)
>
> Yes, please.
Please hold on.
I don't like the UTF-8 movement in OpenBSD.
1. I have an impression that it's basically moving the focus from
ASCII to narrowed-down UTF-8, while there are plenty of other locales
and character systems.
I need iso-latin-2, at times ucs-2, utf-16 and others.
2. They keep reinventing functions to replace the traditional ones
from libc, like ctype(3).. in every tool in their userland. This is
messing the code.
3. I don't like the movement towards new idioms 'display length of
word' 'display length of space after word'. It's not easy to
understand correctly them without the context.
I prefer to keep 30-years old fmt(1) than messed one. I think there is
better to move to a locale-aware functions from an external library
like icu [1] (mit-licensed) or abstract the implementation details/new
idioms with our own library in libc.
The diff in fmt(1) after adding UTF-8 support:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/fmt/fmt.c.diff?r1=1
.33&r2=1.36&f=h
I wouldn't like to maintain such userland. I don't know how about
fmt(1).. but other tools after(during) the migration (like tmux) were
incapable to handle bidirectional alphabets.
[1] http://site.icu-project.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWkGQEAAoJEEuzCOmwLnZsAuIQAJp1P8E9qSOREqXeTeEOOG9L
cWUp9vciBhe9BSTTjfPF39/M+BSccBx4AuZny+UGgAXAE/ZLGpTjhIQV0NoEHUqO
drnWWWiyI2eRsOPR8l3773xuz3G7v8XZXsE9OFi4Xkd4MSllBVKDSPSNLQqtIlRl
RqIo/XzEtyX3nfnYlBvYnuvhOquRAm1uDGnL+wsxbYZj3t7O2sSF+kg6wtIHdzZQ
ZNXX5JkGemcMQJMDu70++eA3lEoByR7spZlDhRIz+aKqssovTsHLENSwJWe6blTs
E9aZ/9aGBQdY4ulPzouMNBSXeZE4XRAyO786bZE+/UTPlJQ6aGge7pzmBuQ5BTf7
H7wsPI2IyM8ZWW7yBqaxIrZ+2s0SMHWK5SsRzjkUwWcNMe+Bi7cgtguQ7jI79VEx
HACma7wrbNtTJMsRs8exSFklsYriNItdzB7Aq1egk5PrM7W72CL6m5G729CgKgV6
4IoxmdxTYo4xMZ14DM4zf+nc1e+m+cDIrsPR2ypQ2mIIKByE4S+4OFVjloowxK0h
xwbligPVEEPHELoY/CyrqKudQT5086N0Q1qr5Cv1oVCeaANOOB/b0e8Hilt54K6v
ORDkcKxEfLvv6LmnpH+XVv2krvEhzoIv09X/4DM9UCQtI+Yh1GrRlyxb5c/bKrnN
gSWDaNu1uZf4FTvVc6Vs
=qmU6
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index