From d266ee66cf3e366fbeb6d92c03dedff3b7aa3f14 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 16 Feb 2023 22:54:42 +0100 Subject: Revert "compiler: fix support for non-utf8 terminals" The reverted changeset fixed some crash due to character encoding mismatch in terminal emulators. Doing so, it made it possible for the compiler to complete without reporting any error, while outputting wrongly encoded files. It's better to revert that changeset until all the encoding issue are solved consistently. This reverts commit 0fddc74a3f9add47841124b4d77b097f4646d14f. --- changelog.md | 1 - compiler/app/Main.hs | 5 ++--- compiler/package.yaml | 3 +-- flake.nix | 2 ++ 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 66de4b9..07a6d3a 100644 --- a/changelog.md +++ b/changelog.md @@ -11,7 +11,6 @@ release. Releases are tracked and referred to using git tags. - Bug fixes: - compiler: fix detection of dimensions of EXIF-rotated pictures. Rebuild the gallery with `--rebuild-all` to purge erroneous cached data. - - compiler: fix support for non-UTF8 terminals. - viewer: fix theme quirks (line spacing, icon colours). - viewer: fix ghost keyboard hints when the search panel is closed. diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs index a9630ce..3e6f254 100644 --- a/compiler/app/Main.hs +++ b/compiler/app/Main.hs @@ -1,7 +1,7 @@ -- ldgallery - A static generator which turns a collection of tagged -- pictures into a searchable web gallery. -- --- Copyright (C) 2019-2022 Pacien TRAN-GIRARD +-- Copyright (C) 2019-2021 Pacien TRAN-GIRARD -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as @@ -28,7 +28,6 @@ import Data.Aeson (ToJSON) import System.FilePath (()) import System.Directory (canonicalizePath, listDirectory) import System.Console.CmdArgs -import Main.Utf8 (withUtf8) import Compiler import Files (readDirectory, copyTo, remove) @@ -104,7 +103,7 @@ options = Options main :: IO () main = - withUtf8 $ do + do opts <- cmdArgs options buildGallery opts deployViewer opts diff --git a/compiler/package.yaml b/compiler/package.yaml index 539bf9d..4b749e1 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -4,7 +4,7 @@ homepage: https://ldgallery.pacien.org github: "pacien/ldgallery" license: AGPL-3.0-only author: "Pacien TRAN-GIRARD, Guillaume FOUET" -copyright: "2019-2022 Pacien TRAN-GIRARD, Guillaume FOUET" +copyright: "2019-2021 Pacien TRAN-GIRARD, Guillaume FOUET" extra-source-files: - readme.md @@ -29,7 +29,6 @@ dependencies: - safe - time - process -- with-utf8 default-extensions: - DuplicateRecordFields diff --git a/flake.nix b/flake.nix index b0c9586..714e26d 100644 --- a/flake.nix +++ b/flake.nix @@ -137,6 +137,8 @@ src = ./example; nativeBuildInputs = [ ldgallery ]; buildPhase = '' + # Need UTF-8: https://github.com/ldgallery/ldgallery/issues/341 + export LC_ALL=C.UTF-8 ldgallery --input-dir src --output-dir $out --with-viewer ''; installPhase = ":"; -- cgit v1.2.3