fixed encoding

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@29 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-07-27 08:31:46 +00:00
parent 46479c07cf
commit 304cae4c55
2 changed files with 19 additions and 6 deletions

View file

@ -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)
{