Skip to content
/ jacot Public

jacot - Japanese Auto character encoding COnversion on Tty

License

Notifications You must be signed in to change notification settings

saitoha/jacot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

jacot - Japanese Auto character encoding COnversion on Tty

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages