Skip to content

Adding UTF8 support#22

Open
Buzz-Lightyear wants to merge 1 commit intopdtpartners:mainfrom
Buzz-Lightyear:srini/utf-8
Open

Adding UTF8 support#22
Buzz-Lightyear wants to merge 1 commit intopdtpartners:mainfrom
Buzz-Lightyear:srini/utf-8

Conversation

@Buzz-Lightyear
Copy link
Copy Markdown
Collaborator

Closes #5
Inspired by @figsoda's PR: #12 (it was easier to create a new PR since this one doesn't add ? support and resolving merge conflicts would've been significantly harder)
Added unit and integration tests for new cases

@Buzz-Lightyear
Copy link
Copy Markdown
Collaborator Author

@elpdt852 Just a heads up that I'm effectively pinning nix version to 2.18.2 since the latest version enforces stricter null byte handling in strings (NixOS/nix#12024). If I use the latest version we run into:

error:
       … while checking flake output 'packages'
         at /nix/store/9z069aqyfbdr3n21zxlp4xc0fxi9cwrk-source/flake.nix:39:7:
           38|
           39|       packages = forAllSystems (system: {
             |       ^
           40|         default = (import ./integration-tests.nix { pkgs = pkgsFor system; utf8 = utf8.lib; });
       … while checking the derivation 'packages.x86_64-linux.default'
         at /nix/store/9z069aqyfbdr3n21zxlp4xc0fxi9cwrk-source/flake.nix:40:9:
           39|       packages = forAllSystems (system: {
           40|         default = (import ./integration-tests.nix { pkgs = pkgsFor system; utf8 = utf8.lib; });
             |         ^
           41|         integration-tests = (import ./integration-tests.nix { pkgs = pkgsFor system; utf8 = utf8.lib; });
       (stack trace truncated; use '--show-trace' to show the full, detailed trace)
       error: input string '␀' cannot be represented as Nix string because it contains null bytes
       at /nix/store/iryq2dkiw2gxiz1xzx3plfrwx2mlacjq-source/table.nix:3:4:
            2| {
            3|   "" = 1;
             |    ^
            4|   "�" = 1;

I'll create an issue in @figsoda's lib and see if I have some time to put up a PR.

@elpdt852
Copy link
Copy Markdown
Contributor

Does that mean adding utf8 support will make globset incompatible with Nix later than 2.18.2?

@Buzz-Lightyear
Copy link
Copy Markdown
Collaborator Author

Does that mean adding utf8 support will make globset incompatible with Nix later than 2.18.2?

@elpdt852 As it stands, yes. I'll see if I can take a crack at figsoda/utf8#18, release a new version and use that here. That should remove this constraint.

@elpdt852
Copy link
Copy Markdown
Contributor

Ok thanks, as it stands then we should hold-off on merging this.

@figsoda figsoda mentioned this pull request Feb 25, 2026
@figsoda
Copy link
Copy Markdown

figsoda commented Feb 25, 2026

just released v0.1.2 with the fix, sorry about the delay

@smpdt
Copy link
Copy Markdown

smpdt commented Mar 7, 2026

just released v0.1.2 with the fix, sorry about the delay

No problem, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for UTF8

4 participants