Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xiaq/wcswidth-aas

wcswidth as a service
https://github.com/xiaq/wcswidth-aas

Last synced: 21 days ago
JSON representation

wcswidth as a service

Awesome Lists containing this project

README

        

# wcswidth as a service

Terminals don't know how wide characters really are :disappointed::disappointed::disappointed::

![mac](https://raw.githubusercontent.com/xiaq/wcwidth-aas/master/mac.png)
![linux](https://raw.githubusercontent.com/xiaq/wcwidth-aas/master/linux.png)

wcswidth-as-a-service to the rescue :smile::smile::smile:! Simply GET a path to obtain its width:

```sh
> curl http://wcwidth.xiaq.me/Hello
5
> curl http://wcwidth.xiaq.me/こんいちは
10
> curl http://wcwidth.xiaq.me/蛤蛤
4
> curl http://wcwidth.xiaq.me/🌚
2
```

What to do next:

- [ ] Replace `wcswidth` implementations in glibc, Cairo, vim, libvte and tmux with a dead-simple HTTP GET
- [ ] ... Profit!