mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
fixed encoding
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@29 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
46479c07cf
commit
304cae4c55
2 changed files with 19 additions and 6 deletions
|
@ -157,11 +157,23 @@ public final class ParserUtils
|
|||
System.out.println("group " + i + ":'" + m.group(i) + "'");
|
||||
}
|
||||
|
||||
public static String urlEncode(String part)
|
||||
public static String urlEncode(final String str)
|
||||
{
|
||||
try
|
||||
{
|
||||
return URLEncoder.encode(part, "utf-8");
|
||||
return URLEncoder.encode(str, "utf-8");
|
||||
}
|
||||
catch (UnsupportedEncodingException x)
|
||||
{
|
||||
throw new RuntimeException(x);
|
||||
}
|
||||
}
|
||||
|
||||
public static String urlEncode(final String str, final String enc)
|
||||
{
|
||||
try
|
||||
{
|
||||
return URLEncoder.encode(str, enc);
|
||||
}
|
||||
catch (UnsupportedEncodingException x)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue