Git Product home page Git Product logo

cec's Introduction

CEC: Character Encoding Converter

Convert character encoding to different encoding.

Installation

Install Docker in advance.

Pull the latest docker image.

$ docker pull koash/cec

Alternatively, to build the docker image, do the following.

$ docker build github.com/koash/cec

Usage

Default to UTF-8

Specify the file or directory to convert (Default to utf-8)

$ ./python.sh cec.py [FILE PATH or DIRECTORY] --input-delimiter , --output-delimiter ,

Character encoding information of the read file.

[File] data/14KANAGA.CSV	[Detects] {'confidence': 0.2862116573623867, 'encoding': 'SHIFT_JIS'}
[File] data/test.txt		[Detects] {'confidence': 1.0, 'encoding': 'ascii'}

Converted files are output to result directory.

Specify the output file encoding

e.g., UTF-16

$ ./python.sh cec.py --output-encoding utf_16 [FILE PATH or DIRECTORY] --input-delimiter , --output-delimiter ,

Options

  -h, --help            show this help message and exit
  
  --input-encoding=INPUT_ENCODING
                        specify the input file encoding
  
  --output-encoding=OUTPUT_ENCODING
                        specify the output file encoding. Default is 'utf_8'
  
  --input-delimiter=INPUT_DELIMITER
                        specify the output file delimiter. Default is 'TAB(\t)'
  
  --output-delimiter=OUTPUT_DELIMITER
                        specify the output file delimiter. Default is 'TAB(\t)'
  
  --header=HEADER       specify row number(s) to use as the column names, and the start of the data in input file.
                        Default 'header=-1' has no header and reads the first line as data.
                        header=0 denotes the first line of data rather than the first line of the file.
                        e.g, -1: no header, 0: first line, 1: second line

Sample data

References

cec's People

Contributors

koash avatar

Watchers

James Cloos avatar  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.