[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: perl and UTF-8



On Mon, Jun 21, 2004 at 08:59:08PM -0300, Pedro Fernandes Macedo wrote:

> > good idea. Just be aware that sed and grep are quite slow in UTF
> > environments, and you should run then like this if you know your text
> > is ascii:
> >
> > LANG=C grep ....
>
> This shouldnt be needed.. I remmember seeing a update announcement for 
> grep released some time ago that should fix this on 
> fedora-announce-list. If it is still slow , please fill a report on 
> bugzilla.

On my FC1 system:

[arb home arb]$ rpm -q grep
grep-2.5.1-17.4

[arb home arb]$ echo $LANG
en_US.UTF-8
[arb home arb]$ time grep zymology docs/sowpods.txt
enzymology
zymology
 
real    0m0.267s
user    0m0.260s
sys     0m0.000s

[arb home arb]$ export LANG=C
[arb home arb]$ time grep zymology docs/sowpods.txt
enzymology
zymology
 
real    0m0.012s
user    0m0.000s
sys     0m0.000s

Grep is clearly still much slower in UTF8.

-- 
Anand Buddhdev
Celtel International



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]