Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc2nix.rb:117:in `===': invalid byte sequence in US-ASCII (ArgumentError) #15

Open
ca5ua1 opened this issue Apr 2, 2023 · 2 comments
Open

Comments

@ca5ua1
Copy link

ca5ua1 commented Apr 2, 2023

Fail on non NixOS:


LC_ALL=en_US.UTF-8 nix --extra-experimental-features nix-command --extra-experimental-features flakes  run github:pjones/plasma-manager

/nix/store/40iwnlr30ykqm5ynm0bbk6bsjjc750ad-bash-5.1-p16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Traceback (most recent call last):
        9: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:266:in `<main>'
        8: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:176:in `run'
        7: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:176:in `each'
        6: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:180:in `block in run'
        5: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:114:in `parse'
        4: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:114:in `open'
        3: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:115:in `block in parse'
        2: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:115:in `each'
        1: from /nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:117:in `block (2 levels) in parse'
/nix/store/hljv83bhp04fsavh0mvcksn65w0rpsh6-rc2nix.rb:117:in `===': invalid byte sequence in US-ASCII (ArgumentError)

@pjones
Copy link
Owner

pjones commented Apr 10, 2023

I have no idea why US-ASCII is being used on line 117.

I'm happy to merge a fix once someone figures this out.

@TECHNOFAB11
Copy link

Got it working by setting the following env variable:

export RUBYOPT="-KU -E utf-8:utf-8"

Source

I also set $LANGUAGE and $LC_ALL to $LANG (de_DE.UTF-8 for me) as these were not set, not sure if that was required.

@toast003 toast003 mentioned this issue Dec 20, 2023
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

No branches or pull requests

3 participants