82af2444c3ff043be144d1d1beb72c8ebdec1dae
[yaffs-website] / node_modules / phantomjs-prebuilt / lib / phantom / examples / outputEncoding.js
1 "use strict";
2 function helloWorld() {
3         console.log(phantom.outputEncoding + ": こんにちは、世界!");
4 }
5
6 console.log("Using default encoding...");
7 helloWorld();
8
9 console.log("\nUsing other encodings...");
10
11 var encodings = ["euc-jp", "sjis", "utf8", "System"];
12 for (var i = 0; i < encodings.length; i++) {
13     phantom.outputEncoding = encodings[i];
14     helloWorld();
15 }
16
17 phantom.exit()