firecat53 / networkmanager-dmenu

Control NetworkManager via dmenu
MIT License
811 stars 74 forks source link

Don't override user locale #117

Closed raffaem closed 1 year ago

raffaem commented 1 year ago

I was implementing support for fuzzel.

Unfortunately it didn't work as I use a nerd font icon for the prompt, and even if networkmanager-dmenu overrides the prompt, the default prompt is still specified in the config file which fuzzel still reads at startup.

My understanding is that LC_ALL=C forces 1-byte characters, and given this is a nerd font icon it cannot be represented in 1-byte characters:

❯ LC_ALL=C fuzzel --dmenu
info: main.c:1076: version: 1.8.2 +cairo +png +svg(nanosvg) -assertions
info: config.c:1456: loading configuration from /home/raffaele/.config/fuzzel/fuzzel.ini
 err: config.c:508: /home/raffaele/.config/fuzzel/fuzzel.ini:5: [main].prompt: ﰳ  : not a valie string value

Is there a particular reason we need to override the locale set by the user?

My understanding is that this is somehow legacy practice, and that nowadays it is safe to assume that everything will work correctly with UTF-8.

firecat53 commented 1 year ago

I pinged the original author of the PR that added that line. If there aren't any other comments soon, I'll merge your PR. Thanks!

firecat53 commented 1 year ago

I went ahead and merged the PR to remove the LC_ALL setting. Thanks!