SpookyJS hangs if there is any non-english characters in spooky.then()

143 Views Asked by At

SpookyJS hangs if there are any international characters inside spooky.then function.

try {
    var Spooky = require('spooky');
} catch (e) {
    var Spooky = require('../lib/spooky');
}

var spooky = new Spooky({
    child: {
        transport: 'http'
    },
    casper: {
        logLevel: 'debug',
        verbose: true
    }
}, function (err) {
    if (err) {
        e = new Error('Failed to initialize SpookyJS');
        e.details = err;
        throw e;
    }

    spooky.start('http://en.wikipedia.org/wiki/Spooky_the_Tuff_Little_Ghost');
    spooky.then(function () {
        // 안녕
        this.emit('hello', 'Hello World');
    });
    spooky.run();
});

spooky.on('hello', function (greeting) {
    console.log(greeting);
});

spooky.on('console', function (line) {
    console.log(line);
});

Is there any workaround for this issue?

0

There are 0 best solutions below