博客详情

native2ascii java文件转码小工具 (原创)

作者: 朝如青丝暮成雪
发布时间:2019-04-13 13:43:38  文章分类:java编程   阅读(871)  评论(0)

native2ascii是JDK中自带的一个.exe程序。 如果你的电脑中安装了JDK,那么就可以使用。

参考 https://blog.csdn.net/generalyy0/article/details/7309271。


native2ascii  [-reverse] [-encoding (gbk|iso8859-1)]  inputfile   [outputfile]

示例:

native2ascii  file1.txt file2.txt 

native2ascii -encoding gbk  file1.txt  file3.txt

native2ascii -encoding iso8859-1  file1.txt  file4.txt


native2ascii -reverse  file2.txt 

native2ascii -reverse -encoding gbk file3.txt 

native2ascii -reverse -encoding iso8859-1 file4.txt 


直接在cmd控制台中输入native2ascii,可进入交互式命令模式。此时输入中文后按回车,即可将中文转为本地gbk编码字符 。

也可以在cmd控制台输入native2ascii -reverse 进入交换模式。此时可将输入的本地gbk编码字符转为中文。


STS(eclipse)安装插件:Properties Editor ,可以在properties属性文件中自动转换中文字符到gbk编码。

关键字:  native2ascii  java转码
评论信息
暂无评论
发表评论

亲,您还没有登陆,暂不能评论哦! 去 登陆 | 注册

博主信息
   
数据加载中,请稍候...
文章分类
   
数据加载中,请稍候...
阅读排行
 
数据加载中,请稍候...
评论排行
 
数据加载中,请稍候...

Copyright © 叮叮声的奶酪 版权所有
备案号:鄂ICP备17018671号-1

鄂公网安备 42011102000739号