Mailinglist Archive: opensuse-m17n (69 mails)

< Previous Next >
Re: [m17n] THANKS - grep(ing) Japanese text...
  • From: ピアス エリック <eric_karatsujp@xxxxxxxxxxx>
  • Date: Tue, 21 May 2002 02:49:30 +0000 (UTC)
  • Message-id: <20020521024921.79943.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
That works great.
Too bad there isn't a '-r' (recursive) option for lgrep.
But thanks all the same!
Eric

--- Mike Fabian <mfabian@xxxxxxx> からのメッセージ:
> ピアス エリック <eric_karatsujp@xxxxxxxxxxx> writes:
>
> [...]
>
> > The actual line looks like this:
> > href="info.html">こっち</A></P></DIV>
> >
> > This brings up nothing:
> > $ grep こっち *
> > $
>
> I guess the Japanese in your file is iso-2022-jp
> encoded or SJIS
> encoded. 'grep' will interpret the expression you
> enter in the
> encoding of the locale you are using, which is
> probably EUC-JP.
>
> If you are running in ja_JP.eucJP locale and want to
> grep
> for Japanese in files which may have EUC-JP,
> ISO-2022-JP or SJIS
> encoding, you can use lgrep:
>
> mfabian@gregory:/tmp$ locale charmap
> EUC-JP
> mfabian@gregory:/tmp$ lgrep "こ+っち" ttt*html
> ttt-euc-jp.html:test ここっち test
> ttt-iso-2022-jp.html:test ここっち test
> ttt-sjis.html:test ここっち test
> mfabian@gregory:/tmp$
>
> lgrep will check for all these Japanese encodings.
> lgrep is a hard
> link to lv, i.e. you need to have lv.rpm installed.
>
> --
> Mike Fabian <mfabian@xxxxxxx>
> http://www.suse.de/~mfabian
> 睡眠不足はいい仕事の敵だ。
>

__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/


< Previous Next >
Follow Ups
References