Skip to content

Commit 7635a7a

Browse files
authored
Merge pull request #458 from hbz/fixDeprecationWarningUrlDecode
Adjust URLDecoder.decode usage
2 parents 7b2c4ff + d9a0ec3 commit 7635a7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/views/api.scala.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h2>Suche: <code>@Html(controllers.routes.HomeController.search("text").toString
4646
<dl>
4747
@for((key,value) <- searchSamples) {
4848
<dt>@key</dt>
49-
<dd><a href='@value'>@java.net.URLDecoder.decode(value)</a></dd>
49+
<dd><a href='@value'>@java.net.URLDecoder.decode(value, "UTF-8")</a></dd>
5050
}
5151
</dl>
5252

@@ -74,9 +74,9 @@ <h2 id='content_types'>Inhaltstypen <small><a href='#content_types'><span class=
7474
<h2 id='bulk_downloads'>Bulk-Downloads <small><a href='#bulk_downloads'><span class='glyphicon glyphicon-link'></span></a></small></h2>
7575

7676
<p>Bulk-Downloads können im Format JSON lines (Accept: application/x-jsonlines oder format=jsonl) bezogen werden:</p>
77-
<p><code>curl --header "Accept: application/x-jsonlines" "https://lobid.org@java.net.URLDecoder.decode(routes.HomeController.search("type:Country").toString)" > countries.jsonl</code></p>
77+
<p><code>curl --header "Accept: application/x-jsonlines" "https://lobid.org@java.net.URLDecoder.decode(routes.HomeController.search("type:Country").toString, "UTF-8")" > countries.jsonl</code></p>
7878
<p>Für größere Anfragen kann die Antwort als gzip komprimiert werden:</p>
79-
<p><code>curl --header "Accept-Encoding: gzip" "https://lobid.org@java.net.URLDecoder.decode(routes.HomeController.search("type:Company", format="jsonl").toString)" > companies.gz</code></p>
79+
<p><code>curl --header "Accept-Encoding: gzip" "https://lobid.org@java.net.URLDecoder.decode(routes.HomeController.search("type:Company", format="jsonl").toString, "UTF-8")" > companies.gz</code></p>
8080
<p>Siehe auch diesen Abschnitt zu <a href="http://blog.lobid.org/2018/07/02/lobid-update.html#bulk-downloads">Bulk-Downloads in unserem Blog</a>.</p>
8181

8282
<h2 id="auto-complete">Autovervollständigung <small><a href='#auto-complete'><span class='glyphicon glyphicon-link'></span></a></small></h2>
@@ -98,7 +98,7 @@ <h2 id="auto-complete">Autovervollständigung <small><a href='#auto-complete'><s
9898
<h2 id='jsonld'>JSON-LD <small><a href='#jsonld'><span class='glyphicon glyphicon-link'></span></a></small></h2>
9999

100100
<p>JSON-API-Anfragen liefern <a href="http://json-ld.org/">JSON-LD</a>. Um damit zu experimentieren können sie das JSON-LD oder URLs im <a href="http://json-ld.org/playground/">JSON-LD Playground</a> einfügen.</p>
101-
<dt>JSON-LD Context</dt> <dd><a href='@routes.HomeController.context'>@java.net.URLDecoder.decode(routes.HomeController.context.toString)</a></dd>
101+
<dt>JSON-LD Context</dt> <dd><a href='@routes.HomeController.context'>@java.net.URLDecoder.decode(routes.HomeController.context.toString, "UTF-8")</a></dd>
102102
<dt>RDF-Konvertierung</dt><dd>Mit einem JSON-LD-Prozessor können sie API-Antworten in andere RDF-Serialisierungen umwandeln, z.B. in N-Quads mit <a href="https://github.com/digitalbazaar/jsonld-cli">jsonld-cli</a>:</dd>
103103
<p><code>jsonld format --nquads https://lobid.org@routes.HomeController.authority("4074335-4")</code></p>
104104
<p>Einzeltreffer können per <code>Accept</code> Header auch direkt als RDF/XML, Turtle oder N-Triples angefordert werden:</p>

0 commit comments

Comments
 (0)