summaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js
new file mode 100644
index 00000000..968a6ee2
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js
@@ -0,0 +1,16 @@
+function helloWorld() {
+ console.log(phantom.outputEncoding + ": こんにちは、世界!");
+}
+
+console.log("Using default encoding...");
+helloWorld();
+
+console.log("\nUsing other encodings...");
+
+var encodings = ["euc-jp", "sjis", "utf8", "System"];
+for (var i = 0; i < encodings.length; i++) {
+ phantom.outputEncoding = encodings[i];
+ helloWorld();
+}
+
+phantom.exit()