[Zope] ZCatalog and foreign characters
Aleksander Salwa
ololo@zeus.polsl.gliwice.pl
Tue, 29 Aug 2000 21:17:08 +0200 (CEST)
On Tue, 29 Aug 2000, Radim Gelner wrote:
> is it possible to make ZCatalog work correctly with words containing
> characters other then those given in ISO-8859-1.
>
Yes, I did it very simply.
You have to patch file lib/python/SearchIndex/Splitter.c
very slightly.
Just add line:
#include <locale.h>
somewhere beside include lines (~ line 86)
and line:
setlocale(LC_ALL, "pl_PL");
in function initSplitter, line no. ~493.
It works for polish characters, and all other characters in iso-8859-2
set, so it should satisfy you :)
P.S. You need to compile it, of course:
gcc --shared -O2 Splitter.c -I/usr/include/python1.5 -o Splitter
(include path for RH Linux)
Probably you will need some include files from source distribution.
ololo@zeus.polsl.gliwice.pl
/--------------------------------------\
| `long long long' is too long for GCC |
\--------------------------------------/