| 25 Nov 2022 |
K900 | I don't know why | 16:49:25 |
psvo |
| 16:49:39 |
psvo | * ~
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 | bsh ❯ echo -e '\u00a0'
... seem to work fine (it's nbsp, right?)
| 16:50:48 |
psvo | I can try zsh though | 16:51:36 |
K900 | Yes, it is nbsp | 16:52:18 |
K900 | ~
❯ b2sum /run/current-system/sw/lib/locale/locale-archive
f16c096ec15804fb2aed9fd689becd88f8524d77d60790b1c7655a8935bca6973adba2e1db32b471340b5b497df3a2445955053e25d9df3a66c3963e2815b600 /run/current-system/sw/lib/locale/locale-archive | 16:52:38 |
K900 | Just to make sure I'm not losing it | 16:52:43 |
K900 | What really freaks me out is that it works with syschdemd | 16:55:02 |
K900 | I've double checked and the environment is identical | 16:55:13 |
K900 | Well, basically identical, anyway | 16:55:25 |
psvo | b2sum /run/current-system/sw/lib/locale/locale-archive
56038d33d4b3a5ac4e7e8baf9e39a8ac08e604cf52c11b52123abc141fd28caf4159840f67bd56c53d772dc92fc7e9e39cdd1e549c1b759da41a7af29a6700f2 /run/current-system/sw/lib/locale/locale-archive | 16:55:28 |
psvo | mine is different | 16:55:33 |
K900 | Are you on unstable? | 16:55:37 |
psvo | you mean nixos? | 16:55:57 |
K900 | Yes | 16:57:23 |
psvo | no, I'm on 22.05: 'github:NixOS/nixpkgs/56ca700ceabcfa15396bcf581a1296e8e27ad677' (2022-11-22) | 16:58:48 |
psvo | (using flakes) | 16:58:59 |
psvo | i18n.defaultLocale = "en_US.UTF-8"; | 17:03:16 |
psvo | so, it works for me even in zsh (without any custom setup)
% echo '\u00a0'
| 17:11:22 |
K900 | OK I think I found something | 17:17:29 |
K900 | ~
❯ 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 | So I guess zsh doesn't like it when the environment isn't set up before it starts | 17:18:08 |
K900 | For some reason | 17:18:10 |
K900 | ❯ 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 | And yep it's specifically LOCALE_ARCHIVE | 17:20:34 |
psvo | 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 | And it works fine in child shells because it's already set globally | 17:20:56 |
K900 | And of course LOCALE_ARCHIVE is not in /init's environment because why would it be | 17:21:59 |
psvo | nixos% echo '\u00a0'
zsh: character not in range
nixos% export LC_ALL=en-US.UTF8
nixos% echo '\u00a0'
| 17:23:29 |