[Dev] pylucene fsdirectory patch and unicode issue
Kapil Thangavelu
hazmat at objectrealms.net
Sun May 2 05:06:50 PDT 2004
On Sat, 2004-05-01 at 19:16, Andi Vajda wrote:
> I just integrated your changes. Here is what I did:
>
> - The patches were relative to the 'old' build sources. Our build is in
> flux, we are about to move to a 'new' build and there has been quite a bit
> of shifting around in our CVS repository. The sources of PyLucene that are
> actively maintained are in internal/PyLucene.
> For more information on the 'new' build infrastructure, please see:
> http://wiki.osafoundation.org/bin/view/Jungle/NewBuildInstructions
> I manually added FSDirectory to PyLucene.i and to the make files and
> re-generated the rest.
sorry about the extra work, i'm using the new build system now, and will
send future patches (to bugzilla) based on that.
>
> - The problem with the unicode test was that you were passing a unicode
> string to an InputStreamReader. As in Java, where I borrowed this idea
> from, input streams are for bytes and readers are for unicode chars.
> If you want to read unicode chars from a unicode string you can:
> - encode it as utf-8 bytes and pass it to an InputStreamReader, which is
> a little wasteful since the job of the InputStreamReader is to stream
> unicode characters
> - or pass the unicode string to a StringReader which I added a class
> for in your tester and to repository/util/Streams.py. Your tester is
> also checked into the new internal/PyLucene/test directory.
>
aha, just when i thought it was safe to forget java ;-)
thanks for the clarification,
-kapil
More information about the Dev
mailing list