file-encoder
this is a script that use iconv to convert files' encoding
Last updated 6 years ago by leungwensen .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install file-encoder 
SYNC missed versions from official npm registry.

file-encoder

file-encoder is a script that uses libicu to detect file encoding & uses iconv to convert files' encoding.

you DO NOT have to know the original encoding of the file to finish the converting

Usage

NOTE: install iconv & ICU first if you haven't.

npm install file-encoder -g
file-encoder -h
  • use case: convert a file's encoding to utf8
file-encoder -f ${filename}
  • use case: convert a file's content to utf8 and write to another file
file-encoder -f ${filename} -t ${targetFilename}
  • use case: convert all files' encoding to gbk in a directory
file-encoder -d ${directory} -e gbk
  • use case: convert all files' encoding to utf8 in a directory recursively
file-encoder -d ${directory} -r
  • use case: convert all files' encoding to utf8 in a directory recursively excluding some paths
file-encoder -d ${directory} -r --exclude node_modules --exclude test --exclude dev
  • use case: convert encoding of all files with specified extnames to utf8 in a directory
file-encoder -d ${directory} --extname js --extname css --extname html

Thanks to

file-encoder is made possible by all these fantastic projects:

Current Tags

  • 0.0.20150925                                ...           latest (6 years ago)

6 Versions

  • 0.0.20150925                                ...           6 years ago
  • 0.0.20150924                                ...           6 years ago
  • 0.0.20150923                                ...           6 years ago
  • 0.0.2015073114                                ...           6 years ago
  • 0.0.2015073113                                ...           6 years ago
  • 0.0.20150731                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2021 © npmmirror.com |