Summary
java.net.URIEncoder.encode() を使用する使用法
public static String encode(String s, String enc) throws UnsupportedEncodingException| パラメータ | s - 変換対象の String |
| enc - サポートされる「文字エンコーディング」の名前 | |
| 戻り値 | 変換後の String |
| 例外 | UnsupportedEncodingException - 指定された文字エンコーディングがサポートされていない場合 |
もっと具体的な使用法
String result = URIEncoder.encode("ほげ", "EUC-JP");