Oleg Broytmann writes:
So I tried to catalog a production service. It worked, but didn't do searches with russian letters, where on debugging host it searched russian texts well. ... Before installing VKSplitter on a production server (FreeBSD) I want to ask A long time ago (at least 6 to 12 months), I helped someone with a similar problem. Apparently, the "locale" code under FreeBSD is not correct.
You may search the (searchable) list archive for traces of our discussion. I can not remember the details. Dieter
On Thu, 1 Mar 2001, Dieter Maurer wrote:
Oleg Broytmann writes:
So I tried to catalog a production service. It worked, but didn't do searches with russian letters, where on debugging host it searched russian texts well. ... Before installing VKSplitter on a production server (FreeBSD) I want to ask A long time ago (at least 6 to 12 months), I helped someone with a similar problem. Apparently, the "locale" code under FreeBSD is not correct.
It was me. There was a bug in Splitter.c. But now it is solved (casting to 'unsigned char' before calling character classification routines from <ctype.h> - without this cast it worked on Linux but not on FreeBSD). It was fixed a long time ago. Now it works fine for me. I use FreeBSD 3.5. My locale string is "pl_PL.ISO_8859-2". Zope 2.2.4. ololo@zeus.polsl.gliwice.pl, oleks@helper.pl, ICQ#: 108588073 o-----------------------------------------------------------o (c) All rights reversed
On Thu, 1 Mar 2001, Aleksander Salwa wrote:
A long time ago (at least 6 to 12 months), I helped someone with a similar problem. Apparently, the "locale" code under FreeBSD is not correct.
It was me. There was a bug in Splitter.c. But now it is solved (casting to 'unsigned char' before calling character classification routines from <ctype.h> - without this cast it worked on Linux but not on FreeBSD). It was fixed a long time ago. Now it works fine for me. I use FreeBSD 3.5. My locale string is "pl_PL.ISO_8859-2". Zope 2.2.4.
Good for you. But it still doesn't work for me. It works on Linux, but doesn't work on Solaris and FreeBSD :( with Zope 2.3.0. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Hi! I made the last proving experiment. I got what I expected. I cleaned the environment a bit. I removed VKsplitter (Splitter.py) and returned back Splitter.so. It is Solaris - one of platforms where I have problems with russin texts. I restarted Zope and reindex Catalog. Search with russian letters didn't work. I recompiled Splitter.so with the gcc option -funsigned-char. I restarted Zope and reindex the catalog. Search with russian texts worked! Resume: it is not enough to pass (unsigned char) to locale functions. One need to recompile Splitter.c completely with all chars unsigned. Don't know why. But it works (for me). On Fri, 2 Mar 2001, Oleg Broytmann wrote:
On Thu, 1 Mar 2001, Aleksander Salwa wrote:
A long time ago (at least 6 to 12 months), I helped someone with a similar problem. Apparently, the "locale" code under FreeBSD is not correct.
It was me. There was a bug in Splitter.c. But now it is solved (casting to 'unsigned char' before calling character classification routines from <ctype.h> - without this cast it worked on Linux but not on FreeBSD). It was fixed a long time ago. Now it works fine for me. I use FreeBSD 3.5. My locale string is "pl_PL.ISO_8859-2". Zope 2.2.4.
Good for you. But it still doesn't work for me. It works on Linux, but doesn't work on Solaris and FreeBSD :( with Zope 2.3.0.
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Mon, 5 Mar 2001, Oleg Broytmann wrote:
I recompiled Splitter.so with the gcc option -funsigned-char. I restarted Zope and reindex the catalog. Search with russian texts worked!
Resume: it is not enough to pass (unsigned char) to locale functions. One need to recompile Splitter.c completely with all chars unsigned. Don't know why. But it works (for me).
Ok, I found why and posted a patch: http://classic.zope.org:8080/Collector/2022/view Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
I plan to integrate this patch in to the next release... Thanks Oleg! - C ----- Original Message ----- From: "Oleg Broytmann" <phd@phd.russ.ru> To: "Zope Mailing List" <zope@zope.org> Sent: Monday, March 05, 2001 12:35 PM Subject: Re: [Zope] Splitter woes
On Mon, 5 Mar 2001, Oleg Broytmann wrote:
I recompiled Splitter.so with the gcc option -funsigned-char. I restarted Zope and reindex the catalog. Search with russian texts worked!
Resume: it is not enough to pass (unsigned char) to locale functions. One need to recompile Splitter.c completely with all chars unsigned. Don't know why. But it works (for me).
Ok, I found why and posted a patch: http://classic.zope.org:8080/Collector/2022/view
Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Mon, 5 Mar 2001, Chris McDonough wrote:
I plan to integrate this patch in to the next release...
A person who helped me to create and debug the patch (my provider's programmer) pointed that Query.c also has one call to tolower without cast. I looked into it and found call tolower(k), where k is really int. I am not sure whether it should be casted to unsigned. Probably it should. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (5)
-
Aleksander Salwa -
Chris McDonough -
Dieter Maurer -
Oleg Broytmann -
Oleg Broytmann