Last modified: 2009-02-03 16:15:02 UTC
There are (very) different results with &cmcontinue between using %20 and underline (_). When using underlines, the results are wrong! Example: * http://he.wikisource.org/w/api.php?action=query&format=xml&list=categorymembers&cmtitle=%D7%A7%D7%98%D7%92%D7%95%D7%A8%D7%99%D7%94:%D7%A2%D7%A8%D7%95%D7%9A_%D7%94%D7%A9%D7%95%D7%9C%D7%97%D7%9F&cmprop=title&cmcontinue=%D7%A2%D7%A8%D7%95%D7%9A%20%D7%94%D7%A9%D7%95%D7%9C%D7%97%D7%9F%20%D7%94%D7%9C%D7%9B%D7%95%D7%AA%20%D7%9C%D7%95%D7%9C%D7%91%7C&cmlimit=500 (good) * http://he.wikisource.org/w/api.php?action=query&format=xml&list=categorymembers&cmtitle=%D7%A7%D7%98%D7%92%D7%95%D7%A8%D7%99%D7%94:%D7%A2%D7%A8%D7%95%D7%9A_%D7%94%D7%A9%D7%95%D7%9C%D7%97%D7%9F&cmprop=title&cmcontinue=%D7%A2%D7%A8%D7%95%D7%9A_%D7%94%D7%A9%D7%95%D7%9C%D7%97%D7%9F_%D7%94%D7%9C%D7%9B%D7%95%D7%AA_%D7%9C%D7%95%D7%9C%D7%91%7C&cmlimit=500 (wrong, very same titles, only each %20 has been replaced with _)
The first list show pages on the main namespace The second one show pages on Template namespace
(In reply to comment #0) > There are (very) different results with &cmcontinue between using %20 and > underline (_). When using underlines, the results are wrong! That's not very surprising, since you specified the wrong cmcontinue. The cmcontinue value given in the <query-continue> tag has spaces, not underscores, in it, so you should send spaces (urlencoded as %20), not underscores, back in the cmcontinue value. Resolving as INVALID for this reason.
One more remark: a quick look into the categorymembers code learns that the cmcontinue values are not titles, but sortkeys, which is why they're not normalized (underscores converted to spaces etc.) like titles are.
Hmm, I do not understand why an underscore instead of %20 is making the API to output a template's data suddenly. Isn't that a bug? Furthermore, is there a easy way to also allow underlines, beside spaces and %20? If not, at least make sure the results won't be those of other namespaces mysteriously (as there is no colon at all).
(In reply to comment #4) > Hmm, I do not understand why an underscore instead of %20 is making the API to > output a template's data suddenly. Isn't that a bug? > No, Platonides was incorrect. The first request lists pages from both the main and Template namespaces, the second requests lists only pages in the template namespaces. It's the same list, but with a different starting point. > Furthermore, is there a easy way to also allow underlines, beside spaces and > %20? If not, at least make sure the results won't be those of other namespaces > mysteriously (as there is no colon at all). > They're SORTKEYS, not TITLES, as I said before. Sortkeys aren't normalizable or namespace-bound because they can literally be any string that doesn't contain ]].