FROST-Server icon indicating copy to clipboard operation
FROST-Server copied to clipboard

Issue querying FROST-Server with umlauts in name

Open mikedolx opened this issue 11 months ago • 5 comments

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

mikedolx avatar Mar 22 '24 15:03 mikedolx

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.

hylkevds avatar Mar 22 '24 15:03 hylkevds

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

mikedolx avatar Mar 24 '24 20:03 mikedolx

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

hylkevds avatar Mar 25 '24 08:03 hylkevds

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

mikedolx avatar Mar 25 '24 12:03 mikedolx

The problem seems to be somewhere in our system.

image

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

ChrisMalewski avatar Jul 17 '24 11:07 ChrisMalewski