'use strict'; | |
const path = process.argv[2]; | |
if (!path) { | |
console.log('Add the file path, please.'); | |
process.exit(); | |
} | |
const fs = require('fs'); | |
fs.createReadStream(path, {encoding: 'utf8'}) | |
.pipe(fs.createWriteStream(path.replace(/(\.[^.]+)?$/, '.utf16$1'), {encoding: 'utf16le'})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment