Comment 28 for bug 1576411

Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

@chipaca

The issue that remains is that applications that need UTF-8 require workarounds in the snap.

This issue explains it in more detail with an example in python: https://bugs.launchpad.net/snapcraft/+bug/1804845

Basically, the issue is that stuff like $LANG gets passed into the snap, but the snap only has the locales C, C.UTF-8 and POSIX. As a result, python applications fall back to ASCII, breaking many libraries such as click.

snapcraft itself has that issue and works around it by forcing "C.UTF-8": https://github.com/snapcore/snapcraft/blob/4042556714400d2156cb89efb86bf294500d1f41/snapcraft/cli/__main__.py#L40

I don't know if this is a snapd, core, documentation or snapcraft issue, but many, many people trip over it. Just look at how many forum posts contain locale errors concerning C.UTF-8: https://forum.snapcraft.io/search?q=locale%20c.utf-8%20error