Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/downgoon/gbk2utf8
convert files from gbk encoding to utf-8 or rename packages including java source codes and any type configuration files
https://github.com/downgoon/gbk2utf8
gbk2utf8 package-rename refactor
Last synced: 3 months ago
JSON representation
convert files from gbk encoding to utf-8 or rename packages including java source codes and any type configuration files
- Host: GitHub
- URL: https://github.com/downgoon/gbk2utf8
- Owner: downgoon
- Created: 2016-12-03T17:45:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T16:38:11.000Z (over 3 years ago)
- Last Synced: 2024-10-10T20:54:23.638Z (3 months ago)
- Topics: gbk2utf8, package-rename, refactor
- Language: Java
- Homepage:
- Size: 48.8 KB
- Stars: 78
- Watchers: 4
- Forks: 43
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# converting files encoding in some path from GBK to UTF8
[![HitCount](http://hits.dwyl.io/downgoon/gbk2utf8.svg)](http://hits.dwyl.io/downgoon/gbk2utf8) [![Join the chat at https://gitter.im/gbk2utf8/Lobby](https://badges.gitter.im/gbk2utf8/Lobby.svg)](https://gitter.im/gbk2utf8/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub stars](https://img.shields.io/github/stars/downgoon/gbk2utf8.svg)](https://github.com/downgoon/gbk2utf8/stargazers) [![GitHub forks](https://img.shields.io/github/forks/downgoon/gbk2utf8.svg)](https://github.com/downgoon/gbk2utf8/network)
## how to run
### for any platform
``java -jar gbk2utf8-0.1.1-SNAPSHOT-all.jar $src-gbk-path $dst-utf8-path``
for help, run ``java -jar gbk2utf8-0.1.1-SNAPSHOT-all.jar``
**NOTE**
>a precompiled package is available at [v0.1.1 Releases](https://github.com/downgoon/gbk2utf8/releases/tag/v0.1.1), you can go to this page and download it directly.
### for Mac platform (64bit)
- download [gbk2utf8-0.1.1.pkg](https://github.com/downgoon/gbk2utf8/releases/download/v0.1.1/gbk2utf8-0.1.1.pkg)
- double click it and install
- run command```
$ gbk2utf8 # converting from gbk2 to utf8
Usage: Gbk2Utf8 [include-extension (default 'java')]
$ gbk2utf8 convert
Usage: Gbk2Utf8 [include-extension (default 'java')]
$ gbk2utf8 pkgrename # rename package
Usage: PackageRename
Example: PackageRename ~/original ~/alternative com.example. io.downgoon
$ gbk2utf8 version
0.1.1
```**NOTE**
>``gbk2utf8-0.1.1.pkg`` will be installed in /usr/local/gbk2utf8 directory and a softlink /usr/local/bin/gbk2utf8 (linking to /usr/local/gbk2utf8/bin/gbk2utf8) will be created.![installing gbk2utf8-0.1.1.pkg](https://cloud.githubusercontent.com/assets/23731186/24492177/081a1266-155d-11e7-91bd-207fd2c9a2f7.png)
### for Ubuntu platform (64bit)
- download
```
wget https://github.com/downgoon/gbk2utf8/releases/download/v0.1.1/gbk2utf8_0.1.1_armhf.deb
```- install
```
dpkg -i gbk2utf8_0.1.1_armhf.deb
```- run
```
$ gbk2utf8 # converting from gbk2 to utf8
Usage: Gbk2Utf8 [include-extension (default 'java')]
$ gbk2utf8 convert
Usage: Gbk2Utf8 [include-extension (default 'java')]
$ gbk2utf8 pkgreanme # package renaming
Usage: Gbk2Utf8 [include-extension (default 'java')]
$ gbk2utf8 version
0.1.1
```-----
## how to build
git clone https://github.com/downgoon/gbk2utf8.git
cd gbk2utf8
mvn clean package
java -jar target/gbk2utf8-0.0.1-SNAPSHOT-all.jar $src-gbk-path $dst-utf8-path
## Highlight* **recursive** converting all necessary files in the specified path
* **encoding detective** do nothing to files not encoded in GBK in specified path## how to package
see [https://github.com/downgoon/pkgmaker](https://github.com/downgoon/pkgmaker)
---
## package rename (a new tool)
``java -cp ./gbk2utf8-0.0.1-SNAPSHOT-all.jar io.downgoon.tools.PackageRename $src-gbk-path $dst-utf8-path ``
---
## Use Cases
- [taobao metaq](https://github.com/killme2008/Metamorphosis/issues/130)
---
## 反馈问题
如果您有不清楚的地方或更好的建议,请在**Issue**中给我们反馈。
操作步骤如下:1. 找到**Issue**入口
![Issue入口](https://cloud.githubusercontent.com/assets/23731186/20863916/7075a704-ba17-11e6-8d18-3670c59c5781.png)2. 新建**Issue**
![新建Issue](https://cloud.githubusercontent.com/assets/23731186/20863922/beb848ae-ba17-11e6-93e9-4a6278d8816a.png)3. 别忘了最好设置一个**Issue**类型
![反馈问题](https://cloud.githubusercontent.com/assets/23731186/20863944/254c597a-ba18-11e6-9df7-d6f23ca1cf7e.png)