From 59d807a2d7e1153086e00c129cdb9dbdac12263c Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 11 May 2023 23:10:00 +0200 Subject: [PATCH] broken encoding in some stations with thanks to lis: https://mk.catgirlsfor.science/notes/9en6jb2ig8 --- src/bahnhofname.gleam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bahnhofname.gleam b/src/bahnhofname.gleam index a783955..8ddb090 100644 --- a/src/bahnhofname.gleam +++ b/src/bahnhofname.gleam @@ -164,7 +164,8 @@ fn fetch_data() -> Result(String, hackney.Error) { let assert Ok(request) = request.from_uri(uri) let assert Ok(response) = hackney.send(request) - Ok(response.body) + // some ü are corrupted for some reason + Ok(string.replace(response.body, "�", "ü")) } fn read_csv() -> List(#(String, String)) {