OmegaT の背景に画像を表示します。
設定ファイルを UTF-8 エンコーディングで読むように修正
| @@ -37,6 +37,7 @@ | ||
| 37 | 37 | import jp.sourceforge.users.yutang.omegat.plugin.moenizer.MoeUI.Parts; |
| 38 | 38 | import jp.sourceforge.users.yutang.omegat.plugin.moenizer.effect.Effect; |
| 39 | 39 | import jp.sourceforge.users.yutang.omegat.plugin.moenizer.effect.Effect.Type; |
| 40 | +import org.omegat.util.FileUtil; | |
| 40 | 41 | import org.omegat.util.Log; |
| 41 | 42 | |
| 42 | 43 | /** |
| @@ -67,7 +68,8 @@ | ||
| 67 | 68 | public MoeConfig(File file) throws IOException { |
| 68 | 69 | this.file = file; |
| 69 | 70 | if (file.isFile()) { |
| 70 | - config = createBindedConfigSlurper().parse(file.toURI().toURL()); | |
| 71 | + String script = FileUtil.readTextFile(file); // as UTF-8 | |
| 72 | + config = createBindedConfigSlurper().parse(script); | |
| 71 | 73 | addAll(sortedConfigs, config); |
| 72 | 74 | } |
| 73 | 75 | } |