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 反編譯時出現亂碼。增加運行參數。

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。

// 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

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.

// 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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM