Skip to content

Instantly share code, notes, and snippets.

View na2hiro's full-sized avatar
💽
Remix!

na2hiro na2hiro

💽
Remix!
View GitHub Profile
var Iconv = require("iconv").Iconv, conv = new Iconv('shift_jis','UTF-8//TRANSLIT//IGNORE');
var fs = require("fs");
var filename = process.argv[2];
if(!filename) throw "need argument";
fs.readFile(filename, function (err, data) {
if (err) throw err;
var output="";
conv.convert(data).toString().split("¥n").forEach(function(line){
var elems = line.split('","');