mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 20:09:50 +00:00
specify encodings as Charset rather than String
This commit is contained in:
parent
665ee2730d
commit
e781abb3c7
23 changed files with 71 additions and 81 deletions
|
@ -143,11 +143,10 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
private static final String AUTOCOMPLETE_URI = API_BASE + "ajax-getstop.exe/dn?getstop=1&REQ0JourneyStopsS0A=255&S=%s?&js=true&";
|
||||
private static final String ENCODING = "ISO-8859-1";
|
||||
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
final String uri = String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), ENCODING));
|
||||
final String uri = String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), ISO_8859_1));
|
||||
|
||||
return jsonGetStops(uri);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue