-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
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
patchのエンコーディングのバグを修正 #753
patchのエンコーディングのバグを修正 #753
Conversation
…ncoding # Conflicts: # build.gradle # src/main/java/jp/kusumotolab/kgenprog/output/PatchGenerator.java
手元でも文字化けしていないか確認お願いします |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windowsのコマンドプロンプトで実行したところ,文字化け直ってなさそうです.
ログへの出力,パッチファイル共に文字化けします.
java起動時に-Dfile.encoding=UTF-8
のオプションを付ければ文字化けしません.
--- example.CloseToZero
+++ example.CloseToZero
@@ -3,20 +3,19 @@
public class CloseToZero {
/**
- * 整数をゼロに一つ近づけるメソッド
+ * 謨エ謨ー繧偵ぞ繝ュ縺ォ荳�縺、霑代▼縺代k繝。繧ス繝�繝�
*
- * bug: 0を与えたときに0であるべきが1になる
+ * bug: 0繧剃ク弱∴縺溘→縺阪↓0縺ァ縺ゅk縺ケ縺阪′1縺ォ縺ェ繧�
*
- * fix1: バグ行を削除<br>
- * fix2: バグ行の次に 'n--;' を追加<br>
- * fix3: バグ行を 'return n;' で置換
+ * fix1: 繝舌げ陦後r蜑企勁<br>
+ * fix2: 繝舌げ陦後�ョ谺。縺ォ 'n--;' 繧定ソス蜉�<br>
+ * fix3: 繝舌げ陦後r 'return n;' 縺ァ鄂ョ謠�
*
* @param n
* @return
*/
public int close_to_zero(int n) {
if (n == 0) {
- n++; // bug here
} else if (n > 0) {
n--;
} else {
src/main/java/jp/kusumotolab/kgenprog/project/jdt/JDTASTConstruction.java
Outdated
Show resolved
Hide resolved
何かおかしいと思ったら,pushし忘れていました. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows環境でも文字化けしないので問題ないと思います.
フォーマットだけお願いします.
修正しました. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
良いと思います.
マージします.
お疲れ様でした.
resolve #389
resolve #565
変更点
ソースコードはすべて
UTF-8
に変換してから保持する.ファイルへの出力は実行環境に関わらず
UTF-8
.コンソールへの出力時のエンコーディングは実行環境に依存する.
つまり,windowsであれば
windows31-j(shift jis)
,max・linuxであればUTF-8
に変換してから出力する.