Marius Tibeica | 6 Aug 2012 10:48
Picon
Gravatar

Question about serialise

Hi,

Do the serialise method of Document and Query produce a valid utf8 string?
My problem is with the Node.JS binding. I serialise an object, convert the string to a javascript string, convert the javascript string to a std string and then try to unserialise. The error I get from Xapian is "Bad encoded length: no data".

Thanks,
Marius
_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Richard Boulton | 6 Aug 2012 11:52
Gravatar

Re: Question about serialise

On 6 August 2012 09:48, Marius Tibeica <mtibeica <at> gmail.com> wrote:
> Do the serialise method of Document and Query produce a valid utf8 string?

No, they produce a byte string which may contain any byte values.

I'm not sure what the node bindings do with these; if there's no byte
type available in node, there should probably be some option to get
the serialised values as a base64 encoded string or something like
that (but such an option doesn't currently exist as far as I know).

--

-- 
Richard
Liam | 6 Aug 2012 15:18

Re: Question about serialise



On Mon, Aug 6, 2012 at 2:52 AM, Richard Boulton <richard <at> tartarus.org> wrote:
On 6 August 2012 09:48, Marius Tibeica <mtibeica <at> gmail.com> wrote:
> Do the serialise method of Document and Query produce a valid utf8 string?

No, they produce a byte string which may contain any byte values.

I'm not sure what the node bindings do with these; if there's no byte
type available in node, there should probably be some option to get
the serialised values as a base64 encoded string or something like
that (but such an option doesn't currently exist as far as I know).

We'll need to use node Buffer objects, then.
_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Wichert Akkerman | 31 Aug 2012 11:35
Gravatar

License change summary

I finally sat down and tried to summarise the license change thread from 
May in a wiki page: http://trac.xapian.org/wiki/Licensing . I think the 
summary is correct, but if I missed something please let me know.

Wichert.

Gmane