dkt-projekt / e-SMT

Web service for the Moses Statistical Machine Translation
1 stars 0 forks source link

German umlauts are not encoded as UTF-8 in the response #6

Open dsander opened 8 years ago

dsander commented 8 years ago

Even though the response encoding is set to UTF-8, I am getting broken characters when running the example query:

$ curl -v -X POST --header "Content-type:text/plain" -d 'Click on the right button.' "http://api.digitale-kuratierung.de/api/e-smt?source-lang=en&target-lang=de"
*   Trying 178.254.28.219...
* Connected to api.digitale-kuratierung.de (178.254.28.219) port 80 (#0)
> POST /api/e-smt?source-lang=en&target-lang=de HTTP/1.1
> Host: api.digitale-kuratierung.de
> User-Agent: curl/7.43.0
> Accept: */*
> Content-type:text/plain
> Content-Length: 26
>
* upload completely sent off: 26 out of 26 bytes
< HTTP/1.1 200 OK
< Date: Thu, 08 Sep 2016 10:09:51 GMT
< Server: Apache-Coyote/1.1
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: 0
< X-Frame-Options: DENY
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
< Access-Control-Max-Age: 3600
< Access-Control-Allow-Headers: x-requested-with, content-type
< X-Application-Context: application:8092
< Content-Type: text/turtle;charset=UTF-8
< Content-Length: 539
<
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .

<http://freme-project.eu/#char=0,26>
        a               nif:RFC5147String , nif:Context , nif:String ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "26"^^xsd:nonNegativeInteger ;
        nif:isString    "Click on the right button." ;
        itsrdf:target   "Klicke auf das Recht Knopf gedr��ckt.\n"@de .
* Connection #0 to host api.digitale-kuratierung.de left intact
ankitks commented 8 years ago

I will look at the logs and let you know when I solve this issue.

dsander commented 8 years ago

@ankitks Thanks!