Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jw4/to8
Go command line tool to convert text files in all "other" encodings to UTF8 with no BOM.
https://github.com/jw4/to8
charset cli command-line command-line-tool converter go golang utf-8
Last synced: 4 days ago
JSON representation
Go command line tool to convert text files in all "other" encodings to UTF8 with no BOM.
- Host: GitHub
- URL: https://github.com/jw4/to8
- Owner: jw4
- License: mit
- Created: 2017-12-29T00:52:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-05T20:09:49.000Z (almost 7 years ago)
- Last Synced: 2024-06-21T18:01:23.952Z (5 months ago)
- Topics: charset, cli, command-line, command-line-tool, converter, go, golang, utf-8
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# to8
convert files to utf-8## Install
`go get jw4.us/to8`
## Usage
By default this utility will process all named file arguments.
If no names are given, it will find all the regular files in the current directory.
If the Content-Type is determined to be `text/*` (or if `-force` is specified), a new file will be created with a suffix of `.to8` and the utility will copy the contents of the file to the new file after converting the charset to UTF-8. After the copy is done (and if `-dry` is not specified), the new file will be copied over the original file, preserving the file mode bits.
```
Usage of to8:
-dir string
directory to convert (default ".")
-dry
perform dry run only
-exclude string
comma separated directories to exclude (in recurse only) (default ".git,.hg,.svn")
-force
convert all files regardless of content-type
-recurse
find files recursively
-verbose
verbose progress logging
```