Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

jacot - Japanese Auto character encoding COnversion on Tty

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 jacot
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .vimprojects
Octocat-spinner-32 COPYING
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 Makefile
Octocat-spinner-32 README-ja.md
Octocat-spinner-32 README.md
Octocat-spinner-32 README.rst
Octocat-spinner-32 TODO
Octocat-spinner-32 setup.py
README.md

jacot

Overview

Provides the auto-conversion filter supports well-known Japanese Encodings(CP932/EUC-JP).

Install

 $ git clone https://github.com/saitoha/jacot.git
 $ cd jacot
 $ python setup.py install

or via pip

 $ pip install jacot

Usage

 $ jacot [options] [command | -]

Options:

    -h, --help                  show this help message and exit
    --version                   show version
    -t TERM, --term=TERM        override TERM environment variable
    -l LANG, --lang=LANG        override LANG environment variable
    -o ENC, --outenc=ENC        set output encoding
    --disable-input-conversion  disable input auto conversion
    --disable-output-conversion disable output auto conversion
    -s, --enable-skk            use SKK input method

Example:

1. Create auto-conversion TTY session, like cocot.

 $ LANG=ja_JP.UTF-8 $SHELL
 $ echo 'あいうえお今日は≠〆>' | iconv -t cp932
 ???????????????́??Y??
 $ jacot
 $ echo 'あいうえお今日は≠〆>' | iconv -t cp932
 あいうえお今日は≠〆>

2. Read from stdin, without TTY session, just like nkf.

 $ LANG=ja_JP.UTF-8 $SHELL
 $ '三 ┏( ^o^)┛' | iconv -t eucjp | jacot
 三 ┏( ^o^)┛

3. Set terminal encoding

 $ LANG=ja_JP.EUC-JP $SHELL
 $ jacot -o eucjp
 $ '三 ┏( ^o^)┛' | iconv -t sjis
 三 ┏( ^o^)┛

4. Use SKK input method

 $ jacot --enable-skk

How It Works

Comming soon...

Dependence

References

TODO

  • Improve conversion algorithm (ck)
  • Implement glyph substitution or replacement mechanism with considering East Asian Width. (cocot)
  • Auto terminal encodings detection. (MinEd)
  • Switch auto detection on/off setting with private sequence "DECSET/DECRST 8850".
  • Improve Terminal Filter Framework(TFF), support plugin architecture.
  • libfep like API/language binding, socket connection support
  • Support Python 3.x
Something went wrong with that request. Please try again.