Skip to content

3.1b1 Unicode wide char issue when built with Nix #6584

@cole-h

Description

@cole-h

When building the 3.1b1 "release" with Nix, the resulting binary displays the following warning when the prompt contains a unicode character such as λ or **:

<W> fish: Tried to print invalid wide character string

Bisecting the issue, this problem appears to have been introduced with 5134949. 9715db9 (the previous commit) doesn't display this problem.

Something to note is that this issue does not occur when building outside of a Nix environment (aka as detailed in the README) -- the specified characters fail to display at all. It is entirely possible this is a problem with my system due to the fact that it is not pure NixOS and instead Nix + Arch, but I figured the people who would know best are you.

**Note: I tested both Starship and Pure prompts, and both exhibited this behavior. (any Unicode character exhibits this problem)

STR

  1. Build fish-shell with Nix (default.nix to be built with nix-build)
  2. Run sh -c 'env HOME=$(mktemp -d) ./result/bin/fish'
  3. Run function fish_prompt; echo λ; end
  4. <W> fish: Tried to print invalid wide character string

For what it's worth, the message on master (6682f0e) is:

warning: Tried to print invalid wide character string

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intendedregressionSomething that used to work, but was broken, especially between releases

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions