From: Godefroid C. <go...@sw...> - 2002-09-05 12:27:40
|
> >Can someone tell me if it is possible to use encodings in applets ? > >Thanks. Hi all, I found out myself how to make use of encodings in applets. This is what I think I understood : jythonc cannot know about dynamically imported modules (ie by mean of importModule). This implies that it does not join those modules to the applet jar file. The way to work around this 'problem' of jythonc is to explicitely import the needed modules. IOW, as encodings are dynamic, I had to explicitely add import encodings import encodings.latin_1 in order to have those modules compiled in the applet file. I suggest that this explanation could be added (if correct) to the 'Applet issues' page (http://www.jython.org/applets/issues.html) as I found no tip about my problem by googling :-). Further, I would add a note (ie Please read the applet issues) linking to the 'Applet issues' on the 'Applet Demos' page (http://www.jython.org/applets/index.html) just after the already existing note (Note: You must be running a JDK 1.1 compliant web browser to view the applets on this page.). Actually I lost a lot of time by trying to use 'eval' in my applet which I could maybe have avoided if I had found the 'Applet issues' page earlier. PS1 If you want me to do it myself, please tell me. PS2 I was able to make the whole thing work in less than 1 day. However, I had no previous experience with nor Java, nor Jython. I am really impressed. Thanks a lot. PS3 Sorry for cross-post, but I really would like others to avoid the pain to find out about this issue. |