{"id":13823144,"url":"https://github.com/fumiyas/wcwidth-cjk","last_synced_at":"2026-01-03T10:01:12.676Z","repository":{"id":8804342,"uuid":"10499572","full_name":"fumiyas/wcwidth-cjk","owner":"fumiyas","description":"Run command with CJK-friendly wcwidth(3) to fix ambiguous width chars","archived":false,"fork":false,"pushed_at":"2021-04-07T01:55:36.000Z","size":32,"stargazers_count":56,"open_issues_count":6,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-04T09:01:06.270Z","etag":null,"topics":["locale-eaw","preload-library","terminal","unicode","wcwidth"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fumiyas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["fumiyas"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2013-06-05T09:47:46.000Z","updated_at":"2024-05-25T11:59:51.000Z","dependencies_parsed_at":"2022-08-24T13:42:50.777Z","dependency_job_id":null,"html_url":"https://github.com/fumiyas/wcwidth-cjk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumiyas%2Fwcwidth-cjk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumiyas%2Fwcwidth-cjk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumiyas%2Fwcwidth-cjk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fumiyas%2Fwcwidth-cjk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fumiyas","download_url":"https://codeload.github.com/fumiyas/wcwidth-cjk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225449306,"owners_count":17476069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["locale-eaw","preload-library","terminal","unicode","wcwidth"],"created_at":"2024-08-04T09:00:22.495Z","updated_at":"2026-01-03T10:01:12.322Z","avatar_url":"https://github.com/fumiyas.png","language":"C","funding_links":["https://github.com/sponsors/fumiyas"],"categories":["C"],"sub_categories":[],"readme":"Run command with CJK-friendly wcwidth(3) to fix ambiguous width chars\n======================================================================\n\n  * Copyright (c) 2013-2019 SATOH Fumiyasu @ OSS Technology Corp., Japan\n  * License: BSD-like (2-clause, see wcwidth.c)\n  * URL: \u003chttps://GitHub.com/fumiyas/wcwidth-cjk\u003e\n  * Twitter: \u003chttps://twitter.com/satoh_fumiyasu\u003e\n\nWhat's this?\n---------------------------------------------------------------------\n\nThis is a `$LD_PRELOAD`-able library and a wrapper script to\nrun a command with CJK-friendly `wcwidth`(3) implementation for\nfixing \"East Asian Ambiguous Width Characters\" problem.\n\n日本語 (In Japanese): 「East Asian Ambiguous Width chars 問題」を\n解決するための `$LD_PRELOAD` 可能な共有ライブラリーとラッパー\nスクリプトです。「α」などの「East Asian Ambiguous Width chars」の\n表示や編集で問題が発生するコマンドをこの実装下で起動すると、\nシステム標準の `wcwidth`(3) が置き換えられ、問題を解消できます。\n\nHow to build\n---------------------------------------------------------------------\n\nRequired packages: autoconf, automake, libtool, make, cc (gcc or misc)\n\n    $ sh autogen.sh\n    $ ./configure --prefix=/usr/local\n    $ make\n    $ sudo make install\n\nUsage\n---------------------------------------------------------------------\n\nRun a command with `$LD_PRELOAD`-able library:\n\n    $ export LD_PRELOAD=/usr/local/lib/wcwidth-cjk.so\n    $ exec zsh -l\n    ...\n\nor:\n\n    $ eval `/usr/local/bin/wcwidth-cjk --sh-init`\n    $ exec zsh -l\n    ...\n\nRun a command via wrapper script:\n\n    $ /usr/local/bin/wcwidth Ab漢α¥\n    1 00 00 00 41   A\n    1 00 00 00 62   b\n    2 00 00 6F 22   漢\n    1 00 00 03 B1   α\n    1 00 00 00 A5   ¥\n    $ /usr/local/bin/wcwidth-cjk /usr/local/bin/wcwidth Ab漢α¥\n    1 00 00 00 41   A\n    1 00 00 00 62   b\n    2 00 00 6F 22   漢\n    2 00 00 03 B1   α\n    1 00 00 00 A5   ¥\n    $ exec /usr/local/bin/wcwidth-cjk zsh -l\n    ...\n\nReferences\n---------------------------------------------------------------------\n\n  * East Asian Ambiguous Width chars problem\n    + http://sourceware.org/bugzilla/show_bug.cgi?id=4335\n    + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471021\n    + http://d.hatena.ne.jp/vmi/20090523/p1\n    + http://d.hatena.ne.jp/vmi/20090524/p1\n    + http://d.hatena.ne.jp/vmi/20090526/p1\n    + http://d.hatena.ne.jp/vmi/20090604/p1\n    + http://ta.ps.st/d/1331733974.html\n    + http://vdr.jp/d/20070326.html\n  * CJK-friendly `wcwidth`(3) (`wcwidth_cjk()` in `wcwidth.c`): \n    + http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c\n    + ftp://ftp.mutt.org/mutt/devel/\n    + http://www.emaillab.org/mutt/download1521.html\n    + https://twitter.com/ttkzw/status/341958235814768640\n    + https://twitter.com/ttkzw/status/341954474333581313\n    + https://twitter.com/ttkzw/status/341960339300159488\n  * hamano/locale-eaw: East Asian Ambiguous Width問題の修正ロケール\n    * https://github.com/hamano/locale-eaw\n  * Emoji - Wikipedia, the free encyclopedia\n    * https://en.wikipedia.org/wiki/Emoji\n  * uwabami/locale-eaw-emoji: UAX#11 Ambiguous と UTR #51 Emoiji を全角とする修正 locale\n    * https://github.com/uwabami/locale-eaw-emoji\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffumiyas%2Fwcwidth-cjk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffumiyas%2Fwcwidth-cjk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffumiyas%2Fwcwidth-cjk/lists"}