Difference in behaviour, Interactive Interface vs. API


I am doing a preparation work before the application I am working on is extended to support more languages including Chinese, Japanese and Korean. So far all XML documents were in English, in UTF-8 and the collection settings were the default ones in terms of collation. For the purpose, I changed some documents to contain some Japanese characters.

I have noticed a difference in behaviour for a given XQuery using tf:containsText between the Interactive Interface and the Java API. The pattern being passed to tf:containsText is composed as “some japanese character here”. I used my debugger to capture the query and paste it into the TII to make sure I was using exactly the same query in both cases.
The TII is able to retrieve the corresponding document, while the Java API fails.
Am I doing anything wrong? is it a limitation of the API (I have noticed some mention of lost encoding in the Release Notes) or is there any additional precaution to make it work?

(Tamino + HP-UX 11)