Utf8 fixes

fix the output stream to write UTF8; fix or work around loadSubScript issues with UTF8 to such extent as it is possible. (it isn't entirely possible for gecko < 2, but everything seems good in gecko 2).