Skip to content

Instantly share code, notes, and snippets.

@lennart
Created April 27, 2012 10:13
Show Gist options
  • Save lennart/2508168 to your computer and use it in GitHub Desktop.
Save lennart/2508168 to your computer and use it in GitHub Desktop.
Show off UTF8 char decomposition on filenames, OS X does it, Windows cannot handle it
var net = require('net')
, fs = require('fs')
, decomposed = fs.readdirSync("./decomposed")[0]
, client;
client = net.connect(12345, "<<the-windows-node>>", function() {
client.write(decomposed);
});
var net = require('net')
, server = net.createServer(function(stream) {
stream.setEncoding('utf8');
stream.pipe(process.stdout);
});
server.listen(12345, "0.0.0.0");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment