Skip to content

convert files from gbk encoding to utf-8 or rename packages including java source codes and any type configuration files

Notifications You must be signed in to change notification settings

downgoon/gbk2utf8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

converting files encoding in some path from GBK to UTF8

HitCount Join the chat at https://gitter.im/gbk2utf8/Lobby GitHub stars GitHub forks

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, you can go to this page and download it directly.

for Mac platform (64bit)

$ gbk2utf8        # converting from gbk2 to utf8
Usage: Gbk2Utf8 <src-gbk-path> <dst-utf8-path> [include-extension (default 'java')]
$ gbk2utf8 convert
Usage: Gbk2Utf8 <src-gbk-path> <dst-utf8-path> [include-extension (default 'java')]
$ gbk2utf8 pkgrename # rename package
Usage: PackageRename <src-path> <dst-path> <original-package-prefix> <alternative-package-prefix>
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

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 <src-gbk-path> <dst-utf8-path> [include-extension (default 'java')]
$ gbk2utf8 convert
Usage: Gbk2Utf8 <src-gbk-path> <dst-utf8-path> [include-extension (default 'java')]
$ gbk2utf8 pkgreanme   # package renaming
Usage: Gbk2Utf8 <src-gbk-path> <dst-utf8-path> [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


package rename (a new tool)

java -cp ./gbk2utf8-0.0.1-SNAPSHOT-all.jar io.downgoon.tools.PackageRename $src-gbk-path $dst-utf8-path <src-path> <dst-path> <original-package-prefix> <alternative-package-prefix>


Use Cases


反馈问题

如果您有不清楚的地方或更好的建议,请在Issue中给我们反馈。 操作步骤如下:

  1. 找到Issue入口 Issue入口

  2. 新建Issue 新建Issue

  3. 别忘了最好设置一个Issue类型 反馈问题

About

convert files from gbk encoding to utf-8 or rename packages including java source codes and any type configuration files

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages