Perlfect Solutions
 

[Perlfect-search] can perlfect support Chinese(gb)?

Daniel Naber daniel.naber@t-online.de
Mon, 9 Apr 2001 15:00:47 +0200
On Sunday 08 April 2001 03:47, you wrote:

> I install perlfect in our lab(intranet),now I can use it to search en
> language,but can't search chinese(gb), does perlfect suport chinese(gb)
> searching? or how to solve this problem?

[Everybody who uses an encoding different to ASCII or Latin1 may also test 
this, not only Chinese]

Maybe we can get it working by some hacks. Since I don't speak chinese I 
need your help to test it. Please try this:

-in conf.pl, set $SPECIAL_CHARACTERS = 0;

-in indexer.pl, comment out these lines:

${$buffer} =~ tr/a-zA-Z0-9_/ /cs;
${$buffer} = lc ${$buffer};

so they look like this:

#  ${$buffer} =~ tr/a-zA-Z0-9_/ /cs;
#  ${$buffer} = lc ${$buffer};

-in search.pl, replace these lines:

$buffer =~ tr/a-zA-Z0-9_/ /cs;
return lc $buffer;

so they look like this:

#  $buffer =~ tr/a-zA-Z0-9_/ /cs;
return $buffer;

Does this work? Of course you need to call indexer.pl once before you can 
search. If it works, it will only work correctly for big5-only pages, not 
for those that are mixed with e.g. English.

Regards
 Daniel

-- 
Daniel Naber, Paul-Gerhardt-Str. 2, 33332 Guetersloh, Germany
Tel. 05241-59371, Mobil 0170-4819674