From 2dd565d546ef7cba05846e90d79ae4a15a193f41 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 26 Jul 2024 22:12:38 +0200 Subject: do a s/�/ü/ on the input this quirk was forgotten during the haskell rewrite (reported by networkException). It's now done in a somewhat awkward way: it's hard to do this before parsing the csv (when it's still an unencoded ByteString), but doing it later might easily miss relevant places. In either case this does lots of slightly unecessary copying 🤷 Also the nested quadruple fmap feels like its own justification --- app/Main.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/Main.hs b/app/Main.hs index 3ec2cac..b684ac3 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -292,6 +292,7 @@ main = do Right (betriebsstellen :: V.Vector [Text]) <- LB.readFile "data/DBNetz-Betriebsstellenverzeichnis-Stand2021-10.csv" <&> decodeWith csvOptions HasHeader + <&> (fmap . fmap . fmap) (T.replace "�" "ü") let betriebsstellenFiltered = betriebsstellen & V.filter (\line -> line !! 4 `notElem` ["BUSH", "LGR", "ÜST", "BFT", "ABZW", "BK", "AWAN", "ANST", "LGR"]) Right (leitpunkte :: V.Vector [Text]) <- -- cgit v1.2.3