Electron-builder: C.UTF-8 locale missing

Created on 27 Nov 2017  路  12Comments  路  Source: electron-userland/electron-builder

  • electron-builder version: 19.46.9
  • electron-updater version: 2.16.1
  • Target: Linux (Arch)

I'm unable to use electron-builder on Arch Linux, since there's no C.UTF-8 locale on it. The last working version is 19.45.5, AFAIK ([email protected]). The commit that added C.UTF-8 as the default locale for Linux.

bug linux

Most helpful comment

We need some locale for snapcraft, nsis, perl and some other tools.

Previously was en_US.UTF-8, but C.UTF-8 locale doesn't require any locale files. So, we don't need to use localegen, we can run electron-builder on alpine linux and coreos without any additional work.

My assumption was is that C.UTF-8 is supported on any Linux. I will add check for Arch Linux.

All 12 comments

There was a time when C.UTF-8 was a Debian specific locale, but that was included in RHEL in 2015. @jeremejevs What flavour of Linux are you using? Edit: Oh, Arch Linux. I completely overlooked that :)

@purplekrayons I'm using Arch. C.UTF-8 is nice, but it isn't in glibc yet (relevant thread), so there at least must be some sort of a fallback when it isn't available or something like that.

As far as I know, there is no way to determine what locales are available using JavaScript (or TypeScript). It looks like that change was implemented to address a broader range of locale issues. You may be in a tricky spot from where im standing. It seems like there are no immediate plans to include C.UTF-8 in glibc. The common consensus appears to be to leave it up to the various distro's to include. For the time being I would just manually revert the change you linked to permit building in Arch Linux. Perhaps @develar can provide further insight and offer a better suggestion.

We need some locale for snapcraft, nsis, perl and some other tools.

Previously was en_US.UTF-8, but C.UTF-8 locale doesn't require any locale files. So, we don't need to use localegen, we can run electron-builder on alpine linux and coreos without any additional work.

My assumption was is that C.UTF-8 is supported on any Linux. I will add check for Arch Linux.

This isn't limited to Arch, e.g. NixOS doesn't have C.UTF-8 either: https://github.com/NixOS/nixpkgs/issues/20192

@jeremejevs Please send me output of env command to [email protected] (or share here if not private).

@develar Sure:

LANG=en_US.UTF-8

Carefully sanitized :smile: What are you looking for? I can mail you the whole output, but there's nothing else of relevance there.

@jeremejevs LC_CTYPE and LC_ALL?

@develar They aren't in my env.

Here's the output of locale though:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
... same for everything ...
LC_ALL=

And of locale -a:

C
en_US.utf8
POSIX

Another project had this issue in 2015: https://github.com/commercialhaskell/stack/issues/856

Here's the pretty complicated logic they added in the commit that fixed it:

https://github.com/commercialhaskell/stack/commit/478ca7118372fe9a500430cae36924ae64e147c6

@veggiedefender Thanks for info. Our fix is simple :)

Please try prerelease 19.47.0

Was this page helpful?
0 / 5 - 0 ratings