FraunhoferIOSB / FROST-Server

A Complete Server implementation of the OGC SensorThings API
https://fraunhoferiosb.github.io/FROST-Server/
GNU Lesser General Public License v3.0
199 stars 74 forks source link

Issue querying FROST-Server with umlauts in name #1901

Open mikedolx opened 7 months ago

mikedolx commented 7 months ago

Hi,

i have an issue querying a public FROST-Server and filtering for Datastreams. The reason seems to be the umlaut "ü" contained in the name.

I'd like to filter for this name: Wassertemperatur, 2m Tiefe, Neyetalsperre, Absperrbauwerk, Zeitreihen für Prozedur 2m Tiefe

But when i run a query, it does not return a datastream. I'd expect to retrieve a Datastream. I am using these queries with the name in some scripts, so i am dependend on that functionality.

Here are some examples copied from the code-tab from my postman:

$response = Invoke-RestMethod 'https://fluggs.wupperverband.de/frost/v1.1/Datastreams?$filter=substringof(''Wassertemperatur, 2m Tiefe, Neyetalsperre, Absperrbauwerk, Zeitreihen für Prozedur 2m Tiefe'', name)&$select=id, name' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
wget --no-check-certificate --quiet \
  --method GET \
  --timeout=0 \
  --header '' \
   'https://fluggs.wupperverband.de/frost/v1.1/Datastreams?$filter=substringof('\''Wassertemperatur, 2m Tiefe, Neyetalsperre, Absperrbauwerk, Zeitreihen für Prozedur 2m Tiefe'\'', name)&$select=id, name'

Any idea how i could workaround that issue?

Thanks and BR, Michael

hylkevds commented 7 months ago

The ü itself should not be a problem:

https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Things?$filter=startswith(name,%20%27Graz%20S%C3%BCd%27)

The number of single-quotes in your example looks odd, though that could be a result of how postman escapes quotes.

This does work:

wget 'https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Things?$filter=startswith(name, '\''Graz Süd'\'')'

It could also be a url-encoding problem.

mikedolx commented 7 months ago

Hi,

according to my postman request, this would be the wget equivalent of my request. And i do not get any result from that

wget --no-check-certificate --quiet --method GET --timeout=0 'https://fluggs.wupperverband.de/frost/v1.1/Datastreams?$filter=substringof('\''Zeitreihen für Prozedur Einzelwerte'\'', name)&$select=id, name'

am i doing something wrong?

Thanks and BR

hylkevds commented 7 months ago

Indeed, the problem does seem to be in the ü character. Can you check the character encoding of the database and the table?

mikedolx commented 7 months ago

Unfortunately, i cannot, as this is a server I'm not the admin of. I'll ask the guys.

ChrisMalewski commented 3 months ago

The problem seems to be somewhere in our system.

image

Umlaute are delivered correctly, but we cannot filter with them.