curiousdannii / ifvms.js

The Interactive Fiction Virtual Machines Suite - in Javascript
MIT License
93 stars 22 forks source link

ReadFilesync - encoding 'binary' does not work on older versions of nodejs #11

Closed jedi4ever closed 11 years ago

jedi4ever commented 11 years ago

fyi -

      throw new Error('Unknown encoding');                                                                      
            ^                                                                                                   
Error: Unknown encoding                                                                                         
    at Buffer.toString (buffer.js:434:13)                                                                       
    at Object.fs.readFileSync (fs.js:236:33)                                                                    
    at Object.exports.zvm (/Users/patrick/dev/interactive-fiction/if/node_modules/ifvms/dist/bootstrap.js:92:16)
    at Object.<anonymous> (/Users/patrick/dev/interactive-fiction/if/t.js:4:29)                                 
    at Module._compile (module.js:449:26)                                                                       
    at Object.Module._extensions..js (module.js:467:10)                                                         
    at Module.load (module.js:356:32)                                                                           
    at Function.Module._load (module.js:312:12)                                                                 
    at Module.runMain (module.js:492:10)                                                                        
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)                                    
curiousdannii commented 11 years ago

What version of node are you using?

jedi4ever commented 11 years ago

my version 8.x barfed , upgrading to 10.x made it work. Not too much to worry about.

curiousdannii commented 11 years ago

That's really odd cause the 0.10 docs say it will be removed in the future... why would they add it for one version if they know they'll just remove it right after?

Anyway I'll fix it using one of the iconv libs.