mirror of https://github.com/lukechilds/docs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
392 B
17 lines
392 B
"use strict";
|
|
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()
|
|
|