-browser: extract private functions getOutput and getOutputLength
-browser: getOutput/getOutputLength: some browsers ignore charset in overrideMimeType, so the responseText must always be manually converted to bytearray string