Perlfect Solutions

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

Daniel Naber
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, 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, 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 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.


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