Last active
November 24, 2016 13:02
-
-
Save midoribashikk/e7fa7de52070050341c47e448a8ce043 to your computer and use it in GitHub Desktop.
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 java.net.URLDecoder; | |
import java.io.UnsupportedEncodingException; | |
public class MyLittleDecoder { | |
public String decode(String str) { | |
String retstr = ""; | |
try { | |
retstr = URLDecoder.decode(str, "Windows-31J"); | |
} catch (UnsupportedEncodingException e) { | |
retstr = "exception..."; | |
} | |
return retstr; | |
} | |
public static void main(String[] args) { | |
MyLittleDecoder obj = new MyLittleDecoder(); | |
for (String arg : args) { | |
System.out.println(obj.decode(arg)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment