!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

340 Members
https://github.com/nix-community/NixOS-WSL58 Servers

Load older messages


SenderMessageTime
25 Nov 2022
@k900:0upti.meK900I don't know why16:49:25
@psvo:matrix.orgpsvo
16:49:39
@psvo:matrix.orgpsvo *
~
bsh ❯ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

16:49:46
@psvo:matrix.orgpsvo
bsh ❯ echo -e '\u00a0'
 

... seem to work fine (it's nbsp, right?)

16:50:48
@psvo:matrix.orgpsvoI can try zsh though16:51:36
@k900:0upti.meK900Yes, it is nbsp16:52:18
@k900:0upti.meK900~ ❯ b2sum /run/current-system/sw/lib/locale/locale-archive f16c096ec15804fb2aed9fd689becd88f8524d77d60790b1c7655a8935bca6973adba2e1db32b471340b5b497df3a2445955053e25d9df3a66c3963e2815b600 /run/current-system/sw/lib/locale/locale-archive16:52:38
@k900:0upti.meK900Just to make sure I'm not losing it16:52:43
@k900:0upti.meK900What really freaks me out is that it works with syschdemd16:55:02
@k900:0upti.meK900I've double checked and the environment is identical16:55:13
@k900:0upti.meK900Well, basically identical, anyway16:55:25
@psvo:matrix.orgpsvob2sum /run/current-system/sw/lib/locale/locale-archive 56038d33d4b3a5ac4e7e8baf9e39a8ac08e604cf52c11b52123abc141fd28caf4159840f67bd56c53d772dc92fc7e9e39cdd1e549c1b759da41a7af29a6700f2 /run/current-system/sw/lib/locale/locale-archive16:55:28
@psvo:matrix.orgpsvomine is different16:55:33
@k900:0upti.meK900Are you on unstable?16:55:37
@psvo:matrix.orgpsvoyou mean nixos?16:55:57
@k900:0upti.meK900Yes16:57:23
@psvo:matrix.orgpsvono, I'm on 22.05: 'github:NixOS/nixpkgs/56ca700ceabcfa15396bcf581a1296e8e27ad677' (2022-11-22)16:58:48
@psvo:matrix.orgpsvo(using flakes)16:58:59
@psvo:matrix.orgpsvoi18n.defaultLocale = "en_US.UTF-8";17:03:16
@psvo:matrix.orgpsvo

so, it works for me even in zsh (without any custom setup)

% echo '\u00a0'
 
17:11:22
@k900:0upti.meK900OK I think I found something17:17:29
@k900:0upti.meK900~ ❯ wsl -e /run/current-system/sw/bin/sh -c 'source /etc/set-environment; exec zsh --login' c/Users/me ❯ ~ ❯ wsl -e /run/current-system/sw/bin/zsh --login /home/k900/.zsh/plugins/fzf-tab-completion/zsh/fzf-zsh-completion.sh:4: character not in range c/Users/me ❯17:17:32
@k900:0upti.meK900 So I guess zsh doesn't like it when the environment isn't set up before it starts 17:18:08
@k900:0upti.meK900For some reason17:18:10
@k900:0upti.meK900❯ wsl -e /run/current-system/sw/bin/sh -c 'export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive; exec /run/current-system/sw/bin/zsh --login'17:20:29
@k900:0upti.meK900And yep it's specifically LOCALE_ARCHIVE17:20:34
@psvo:matrix.orgpsvo

hm, I can replicate this too:

wsl -e /nix/store/xa51hl7d89skwwmv9y3w9wi2lw13cq8v-zsh-5.8.1/bin/zsh --login
nixos% echo '\u00a0'
zsh: character not in range
17:20:43
@k900:0upti.meK900And it works fine in child shells because it's already set globally17:20:56
@k900:0upti.meK900And of course LOCALE_ARCHIVE is not in /init's environment because why would it be17:21:59
@psvo:matrix.orgpsvo
nixos% echo '\u00a0'
zsh: character not in range
nixos% export LC_ALL=en-US.UTF8
nixos% echo '\u00a0'
 
17:23:29

Show newer messages


Back to Room ListRoom Version: 9