X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fcomponents%2Fprotocols.js;h=94eab5d7afd914b8fa1fcc7d0a0b6bbb148c5a23;hb=70740024f9c028c1fd63e1a1850ab062ff956054;hp=d14b3e4e804d5262a886415ea61c8d411e40cc93;hpb=eeed0be1a8abf7e3c97f43b63c1d595e940fef21;p=dactyl.git diff --git a/common/components/protocols.js b/common/components/protocols.js index d14b3e4..94eab5d 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -248,7 +248,7 @@ function LocaleChannel(pkg, path, orig) { function StringChannel(data, contentType, uri) { let channel = services.StreamChannel(uri); - channel.contentStream = services.StringStream(data); + channel.contentStream = services.CharsetConv("UTF-8").convertToInputStream(data); if (contentType) channel.contentType = contentType; channel.contentCharset = "UTF-8"; @@ -293,12 +293,12 @@ function XMLChannel(uri, contentType) { if (doctype) { this.writes.push(doctype + "[\n"); try { - this.writes.push(services.io.newChannel(url, null, null).open()) + this.writes.push(services.io.newChannel(url, null, null).open()); } catch (e) {} if (!open) this.writes.push("\n]"); - this.writes.push(post) + this.writes.push(post); } this.writes.push(channelStream);