Reputation: 1686
Is there any way to transform a request like this:
"Annotation text="President Obama called Wednesday on Congress to extend a tax break
for students included in last year's economic stimulus package, arguing that the policy
provides more generous assistance."
confidence="0.2" support="20"
sparql="SELECT DISTINCT ?x WHERE { ?x a <http://dbpedia.org/ontology/OfficeHolder>; .
?x ?related <http://dbpedia.org/resource/Chicago>; }"
policy="whitelist"
Into this?
I know that spaces are equal to %20 but I don't know the other conversions. Is there any Java library that can do the conversion?
Upvotes: 0
Views: 342
Reputation: 9256
The single parameter version of encode is marked as deprecated. To be more assured of what the method will return, it's best to specify an encoding character set.
URLEncoder.encode( "foobar", "UTF-8" );
The different is that for the single parameter version, "the resulting string may vary depending on the platform's default encoding".
Upvotes: 0