以前用的JD-GUI复制中文时中文丢失,而且还会多丢失一个标点符号“。
然后欲寻求一个资源,发现万恶的CS【CE】N收费。
最终在博客上发现一大佬共享的解决方案。
网址:https://www.cnblogs.com/baishier/p/14137326.html
内容(内含下载资源):
jd-gui-1.6.6 乱码问题整理(about jd-gui-1.6.6 garbled code.) 文章最后有最终版本下载。 前言, 之前一直使用老版本的jd-gui,最近想看看有没有更新,结果发现还真更新了。在github上找到了源码。 git地址:https://github.com/java-decompiler/jd-gui。 在window环境下使用中遇到了乱码问题。特此整理记录。 问题有两个: 一、从反编译代码的界面CTRL+C复制是如果选中内容包含中文,贴到其他编辑器时,中文丢失。 二、打开xml文件、properties文件等包含中文时。中文在反编译界面中显示乱码。用其他工具打开正常。 正文, gradle 的使用不做讲解,请自行学习。 问题一: 更新插件即可,需要重新编译源码。 compile 'com.fifesoft:rsyntaxtextarea:3.0.4'升级到compile 'com.fifesoft:rsyntaxtextarea:3.1.1'。据说升级到3.0.5就解决此问题了。 问题二: 1.使用jd-gui-1.6.6.jar 反编译时出现乱码。增加运行参数。 1 java -D'file.encoding'=utf-8 -jar .\jd-gui-1.6.6.jar 2.使用jd-gui.exe出现乱码的。可以曲线救国。简单修改源码重新编译生成exe文件。原理也和使用jar包时加入运行参数一样。 打开源码中的/jd-gui/build.gradle文件增加红色部分。重新打包发布gradle build。 1 2 3 4 5 6 7 8 9 10 11 12 13 // Java executable wrapper for Windows // launch4j { createExe.dependsOn 'proguard' jvmOptions = ['-Dfile.encoding=utf-8']//这行是新增的 version = textVersion = project.version fileDescription = productName = 'JD-GUI' errTitle 'JD-GUI Windows Wrapper' copyright 'JD-GUI (C) 2008-2019 Emmanuel Dupuy' icon projectDir.path + '/src/launch4j/resources/images/jd-gui.ico' jar projectDir.path + '/' + proguard.outJarFiles[0] bundledJrePath = '%JAVA_HOME%' } 下载链接 链接:https://pan.baidu.com/s/1Z1dM6Te0yAZHkl3E3Nx32A 提取码:fzjs 中文 ↑ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ English ↓ Bottom Download. Introduction, I used to use the old version of JD GUI. I found the source code on GitHub. git address:https://github.com/java-decompiler/jd-gui. In the windows environment, we encounter the problem of garbled code. There are two questions: Q1.[Bug] Can not copy-pasted Non-ASCII characters #268 #303 https://github.com/java-decompiler/jd-gui/issues/268,https://github.com/bobbylight/RSyntaxTextArea/pull/303 Q2.In windows, the default JD GUI is GBK encoding https://github.com/java-decompiler/jd-gui/issues/129 Main Body, how to use gradle ? → https://gradle.org/ Q1: update rsyntaxtextarea and rebuild source。 update compile 'com.fifesoft:rsyntaxtextarea:3.0.4' to compile 'com.fifesoft:rsyntaxtextarea:3.0.5' or higher version and i used 3.1.1。 Q2: 1.use jd-gui-1.6.6.jar please add jvm args like this 1 java -D'file.encoding'=utf-8 -jar .\jd-gui-1.6.6.jar 2.use jd-gui.exe update /jd-gui/build.gradle, and rebuild . it work likes 1. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // Java executable wrapper for Windows // launch4j { createExe.dependsOn 'proguard' jvmOptions = ['-Dfile.encoding=utf-8']//new row version = textVersion = project.version fileDescription = productName = 'JD-GUI' errTitle 'JD-GUI Windows Wrapper' copyright 'JD-GUI (C) 2008-2019 Emmanuel Dupuy' icon projectDir.path + '/src/launch4j/resources/images/jd-gui.ico' jar projectDir.path + '/' + proguard.outJarFiles[0] bundledJrePath = '%JAVA_HOME%' } Download address:https://pan.baidu.com/s/1Z1dM6Te0yAZHkl3E3Nx32A passwd:fzjs if can't download ,email me. baishier.g@gmail.com