summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2023-05-11 23:10:00 +0200
committerstuebinm2023-05-11 23:10:00 +0200
commit59d807a2d7e1153086e00c129cdb9dbdac12263c (patch)
tree750bfa5ecf853c47dcd5c03570a471154031633f
parentdb71361481463fbe5109fc9b5a57fd1083018253 (diff)
broken encoding in some stations
with thanks to lis: https://mk.catgirlsfor.science/notes/9en6jb2ig8
-rw-r--r--src/bahnhofname.gleam3
1 files changed, 2 insertions, 1 deletions
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)) {