Git Product home page Git Product logo

charsetconv's Introduction

CharsetConv

指定されたフォルダの直下にある複数のテキストファイルの文字コードを変換するコマンドラインツールです。

Node.js が必要です。以下から推奨版をダウンロード・インストールしてください。 Node.js

セットアップ方法

コマンドプロンプトを開き、このファイル (README) が存在するフォルダに移動します。 ここでは project フォルダとします。

> cd project

必要なファイルをダウンロード・コンパイルします。

> npm install

コマンドとして実行できるようにリンクを作成します。

> npm link charset-conv

以上でセットアップは完了です。

使い方

> charset-conv -h
Usage: charset-conv [options]

Options:
  -s, --source <path>       Source directory
  -d, --destination <path>  Destination directory
  -f, --from <charset>      Original charset
  -t, --to <charset>        Target charset
  -h, --help                display help for command

コマンド例

C:/test/pattern1/source にあるテキストファイルを UTF-8 から Shift_JIS に変換し C:/test/pattern1/dest に保存するには、以下のコマンドを実行します。

charset-conv --source="C:/test/pattern1/source" --from=UTF-8 --destination="C:/test/pattern1/dest" --to=Shift_JIS

変換に失敗した行がある場合は、以下のように行数と変換前後の内容を出力します。

Conversion completed.
File: file.txt
  #2
    original : - 𠮟
    converted: - ?
  #3
    original : - 𩸕
    converted: - ?
  #4
    original : - 𪚲
    converted: - ?
Conversion completed.

charsetconv's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.