Created
July 21, 2014 16:39
-
-
Save nobusue/f75979ea367d518c185d to your computer and use it in GitHub Desktop.
Gradleでのnative2asciiの代替(不完全版)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 行末に特定の日本語文字があると文字化けしてしまう・・残念 */ | |
import org.apache.tools.ant.filters.EscapeUnicode | |
apply plugin: 'java' | |
processResources { | |
include '**/*.properties' | |
filter{ String line -> | |
//byte[] bytes = line.getBytes() | |
//bytes.each{ printf("%02x", it); print ' ' }; println "" | |
String newStr = new String(bytes, 'UTF-8') | |
//println newStr | |
return newStr | |
} | |
filter(EscapeUnicode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment