diff --git a/CHANGELOG.md b/CHANGELOG.md index 867e168992..bb906da49b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Fixed + +- Fix loading utf-8 config files with `ASCII` locale set by @taimoorzaeem in #4386 + ## [13.0.7] - 2025-09-14 ### Added diff --git a/cabal.project.freeze b/cabal.project.freeze index 33b7f7aa7d..969ea8cd03 100644 --- a/cabal.project.freeze +++ b/cabal.project.freeze @@ -1 +1 @@ -index-state: hackage.haskell.org 2025-07-08T15:50:10Z +index-state: hackage.haskell.org 2025-10-13T04:53:27Z diff --git a/nix/overlays/haskell-packages.nix b/nix/overlays/haskell-packages.nix index 489729f7e9..185184587d 100644 --- a/nix/overlays/haskell-packages.nix +++ b/nix/overlays/haskell-packages.nix @@ -50,6 +50,16 @@ let # jailbreak, because hspec limit for tests fuzzyset = prev.fuzzyset_0_2_4; + # TODO: Remove once available in nixpkgs haskellPackages + configurator-pg = + prev.callHackageDirect + { + pkg = "configurator-pg"; + ver = "0.2.11"; + sha256 = "sha256-mtGtNawDJgz2ZIEVca+IYXVu4oNw9xsfJiYWAqAbbgc="; + } + { }; + hasql-pool = lib.dontCheck (prev.callHackageDirect { pkg = "hasql-pool"; diff --git a/postgrest.cabal b/postgrest.cabal index 1b9741c8d3..521b88b61d 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -100,7 +100,7 @@ library , case-insensitive >= 1.2 && < 1.3 , cassava >= 0.4.5 && < 0.6 , clock >= 0.8.3 && < 0.9.0 - , configurator-pg >= 0.2 && < 0.3 + , configurator-pg >= 0.2.11 && < 0.3 , containers >= 0.5.7 && < 0.7 , cookie >= 0.4.2 && < 0.6 , directory >= 1.2.6 && < 1.4 diff --git a/stack.yaml b/stack.yaml index 20de8d453e..0dabf21a65 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,6 +9,7 @@ nix: pure: false extra-deps: + - configurator-pg-0.2.11 - fuzzyset-0.2.4 - hasql-pool-1.0.1 - jose-jwt-0.10.0 diff --git a/stack.yaml.lock b/stack.yaml.lock index 32956204fc..17d4666356 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -4,6 +4,13 @@ # https://docs.haskellstack.org/en/stable/topics/lock_files packages: +- completed: + hackage: configurator-pg-0.2.11@sha256:de0c56386591e85159436b0af04a8f15a4f4e156354e99709676c2c2ee959505,2850 + pantry-tree: + sha256: 7b4daa4ea970335414f26b313a168cd12182b7b34ea8af2616c83d38699c4301 + size: 2527 + original: + hackage: configurator-pg-0.2.11 - completed: hackage: fuzzyset-0.2.4@sha256:f1b6de8bf33277bf6255207541d65028f1f1ea93af5541b654c86b5674995485,1618 pantry-tree: diff --git a/test/io/configs/expected/utf-8.config b/test/io/configs/expected/utf-8.config new file mode 100644 index 0000000000..2c5851233d --- /dev/null +++ b/test/io/configs/expected/utf-8.config @@ -0,0 +1,40 @@ +db-aggregates-enabled = false +db-anon-role = "" +db-channel = "pgrst" +db-channel-enabled = true +db-extra-search-path = "public" +db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation" +db-max-rows = "" +db-plan-enabled = false +db-pool = 10 +db-pool-acquisition-timeout = 10 +db-pool-max-lifetime = 1800 +db-pool-max-idletime = 30 +db-pool-automatic-recovery = true +db-pre-request = "" +db-prepared-statements = true +db-root-spec = "" +db-schemas = "public" +db-config = true +db-pre-config = "" +db-tx-end = "commit" +db-uri = "postgresql://" +jwt-aud = "" +jwt-role-claim-key = ".\"role\"" +jwt-secret = "" +jwt-secret-is-base64 = false +jwt-cache-max-lifetime = 0 +log-level = "crit" +log-query = "disabled" +openapi-mode = "follow-privileges" +openapi-security-active = false +openapi-server-proxy-uri = "" +server-cors-allowed-origins = "" +server-host = "!4" +server-port = 3000 +server-trace-header = "" +server-timing-enabled = false +server-unix-socket = "" +server-unix-socket-mode = "660" +admin-server-host = "!4" +admin-server-port = "" diff --git a/test/io/configs/utf-8.config b/test/io/configs/utf-8.config new file mode 100644 index 0000000000..9b205b3c9f --- /dev/null +++ b/test/io/configs/utf-8.config @@ -0,0 +1,2 @@ +# Commènt utf-8 chàrs +log-level = "crit"