[mb-devel] Client SDK problem (newbie!)

Lukáš Lalinský lalinsky at gmail.com
Wed Oct 18 10:01:50 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy Bridle wrote:
> I'm using the SDK from C++ in VS2005. When I do an artist query, using
> mb_QueryWithArgs, most of the time it works OK, but if I do a query for eg
> "Fred" (without the quotes) the query fails with an assert failure in
> VS2005's CRT function _chvalidator (in file isctype.c), called from
> RDF_Parse/XML_Parse, while checking a char c with an int value of -61. The
> CRT code is:
> 
> 	_ASSERTE((unsigned)(c + 1) <= 256);
> 
> Presumably this is because there's a Fred on the MB DB somewhere with an
> umlaut or similar character in his name. The assert fails in both UTF-8 and
> ISO-8859-1 modes, but goes away in the Release version of my code because
> the CRT only does the assert in Debug mode. Does anyone have any suggestions
> for handling this (short of just ignoring the failed assert and the
> subsequent one from _chvalidator_l)? 

This is just a guess, but to me it looks like you are using the UTF-16 version
of expat. In UTF-8, all characters should be <= 255.

> As a follow up, the reason I'm querying for artist Fred is that I'm trying
> to see if there's a way of using the queries to give me the first 25 Freds,
> tell me there are more to follow, and then give me the next 25 etc. I'm
> guessing that this isn't possible with the predefined queries, and that I'd
> have to learn a lot more about RDF. Is this correct?

Not using the old RDF web service. There is a new one, XML-based, which allows
you to set the limit. But I think it isn't possible to specify also the offset,
to get the next batch.

- -Lukáš
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFFNfuOOjmgKpITL3sRAhltAKCFa+xuMVvETmWGa9WyOGZUhgNQuQCgtmVI
52/17ZK42I8o7+2gZdeEccU=
=C4sN
-----END PGP SIGNATURE-----



More information about the MusicBrainz-devel mailing list