We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在运行第一次的时候,程序遍历了所有文件并转化,但是第二次还是打印转换,这样的话格式并没有转换啊
The text was updated successfully, but these errors were encountered:
本项目提供java php python等多种编程语言的实现。如果你习惯用java。打开https://github.com/jianboy/gbk2utf8/blob/master/java/convert.java文件,修改srcDirPath路径等就可以了运行了。
实现原理很简单,即遍历所在文件夹所有文件,GBK读取每个文件,然后以UTF-8写入:
FileUtils.writeLines(new File(utf8FilePath), "UTF-8", FileUtils.readLines(javaGbkFile, "GBK"));
php也是类似的道理:
rename($dir."/".$file,$dir."/".mb_convert_encoding($file,"GBK", "UTF-8"));
Sorry, something went wrong.
由于你描述比较模糊,不能具体定位你的问题。如果还有问题,请贴上你的某单个文件。
No branches or pull requests
我在运行第一次的时候,程序遍历了所有文件并转化,但是第二次还是打印转换,这样的话格式并没有转换啊
The text was updated successfully, but these errors were encountered: