Skip to content
jacot - Japanese Auto character encoding COnversion on Tty
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
jacot
.gitignore
.vimprojects
COPYING
MANIFEST.in
Makefile
README-ja.md
README.md
README.rst
TODO
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.