Giter VIP home page Giter VIP logo

charmaniac's Introduction

CharManiac

Windows console application for file text encoding conversion

History

I thought it would be a simple task to change the encoding of a text file via a batch file in the Windows console and at the same time remove or add the BOM. But I found that even after extensive searching, I couldn't find a reasonable solution.

So I fired up my trusty Delphi and wrote a little console application myself that does exactly what I want.

I'm sure it will be a useful tool for someone else too and so I'm releasing it here as an open source project.

Installation

Download the binary from the releases section and extract it to any folder. The application has no dependencies so you can run it out of the box (that is the beauty of Delphi :-)).

Usage dump

If you call the CharManiac.exe from the console you get the following instructions:

CharManiac SourceEncoding TargetEncoding SourceFile TargetFile
Possible text encodings:
 ASCII
 ANSI
 UTF-8(-BOM)
 Unicode(-BOM)

Optional newline config, append to TargetEncoding:
 -UnixNewLine
 -WindowsNewLine

Examples for valid encodings:
 UTF-8-UnixNewLine
 Unicode-BOM-WindowsNewLine

Warning: TargetFile will be overwritten.

Examples

Add BOM to a UTF-8 file:

CharManiac.exe UTF-8 UTF-8-BOM SourceFileWithoutBOM.txt TargetFileWithBOM.txt

Remove BOM from a UTF-8 file:

CharManiac.exe UTF-8-BOM UTF-8 SourceFileWithBOM.txt TargetFileWithoutBOM.txt

Convert ANSI to UTF-8 with BOM:

CharManiac.exe ANSI UTF-8-BOM SourceAnsi.txt TargetUTF-8-BOM.txt

Convert Unicode (UTF-16) to UTF-8 with BOM:

CharManiac.exe Unicode UTF-8-BOM SourceUTF-16.txt TargetUTF-8-BOM.txt

charmaniac's People

Contributors

wladid 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.