I tested with opera mobile for Linux using dragon fly on opera 10.10 for linux then on my windows mobile htc and am unable to set a cookie.
I set the enable cookies to 3 when opening the opera:config page that should accept all cookies.

Script did not produce an error so I set a breakpoint and go to command line, here is the output:

>>> value="hello"
>>> document.cookie=name+"="+escape(value)+expires;
"lessonName=hello; expires=Sat, 22 May 2010 09:59:37 GMT"
>>> document.cookie
>>> document.cookie=name+"="+escape(value)+"; expires=01/01/2011 00:00:00"
"lessonName=hello; expires=01/01/2011 00:00:00"
>>> document.cookie

Setting the cookie to: "lessonName=hello; expires=Sat, 22 May 2010 09:59:37 GMT"
gets me an empty string when asking for document.cookie
Setting the cookie to: "lessonName=hello; expires=01/01/2011 00:00:00"
same empty string.

This works in desktop browsers but not in opera mobile.
Windows mobile and get the following output:
document.cookie="mytest=hello; expires=Sat, 22 May 2010 09:59:37 GMT";
alert("cookie is:"+document.cookie+":empty is it?");
document.cookie="mytest=hello; expires=01/01/2011 00:00:00";
alert("cookie is:"+document.cookie+":empty is it?");

Result is an empty cookie twice (cookie is::empty is it?).

So here is the question: how do I set a cookie on opera mobile?

The files are not http hosted but local, I don't see how that can be a problem. If there is any (better) browser for windows mobile I would like to try that. Firefox (fennec-0.11.en-US.wince-arm.cab) seems to be discontinued and does not start after installing, skyfire doesn't work here in China (get a country not supported message) and don't think that Internet Explorer is an option (unable to open local files after filling in the url it opens in opera), Iris cannot be downloaded because rim took over.
Will try NetFront but think that opera mobile is the most advanced (or most famous anyway) that you can get on windows mobile.