Fixed character encoding problem on AJAX authors page
Worked on the issue described in the preceding post. After several hours, I finally figured this one out: the problem was in the ajax.js library (or at least, it was possible to solve it by tweaking that library -- not actually the same thing!).
This library originally used encodeURIComponent() all over the place to prepare strings for submission through HTTP to the server, for XQuery searching; however, although this worked on Mustard with an older version of Cocoon, the net result on the Lettuce setup was to encode the UTF8 octets instead of the Unicode characters. Replacing encodeURIComponent() with escape() seems to have solved this problem, but it's a bit unsatisfactory, because it's not clear what lies at the root of the difference between the two situations. Both documents seem to be served in exactly the same way with the same headers. The escape() function may not work as expected with characters above 255. Nevertheless, we have a handle on the issue now.
This is an important breakthrough, because it means we can now go ahead and port other projects to the new Lettuce setup (including the Mariage project and the Moses dictionary). Both of these require working Unicode searching, so their ports were stalled until the problem was fixed.