2013/05/02

日本語向け grep コマンド、jvgrep は今まで go-iconv という cgo を使った iconv モジュールに依存していたのだけど、mahonia というキャラクタセットライブラリを使って非依存にした。
mattn/jvgrep - GitHub
https://github.com/mattn/jvgrep
mahonia - Mahonia character-set conversion library for Go - Google Project Hosting

Mahonia is a character-set conversion library implemented in Go. All data is compiled into the execu...

https://code.google.com/p/mahonia/
jvgrep 自体はちょっとファイルサイズが大きくなったけど、ランタイムだと iconv が乗らなくなる分だけメモリ使用量は減ったし、なによりポータブルになった。
ただし mahonia には cp932 などのエイリアスが無いので、JVGREP_ENCODINGS 環境変数を指定していた方は、cp932 を sjis に直す必要があります。

今のところ、dev ブランチですが数日以内には master へブランチにマージします。
Posted at 21:04 | WriteBacks () | Edit
Edit this entry...

wikieditish message: Ready to edit this entry.






















A quick preview will be rendered here when you click "Preview" button.