Language settings different when starting application from shell

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 3.4.0.24
HARDWARE (Jolla1, Tablet, XA2,…): XperiaX
UI LANGUAGE: GER
REGRESSION: (compared to previous public release: Yes, No, ?): ?

DESCRIPTION:

When running an application with pyotherside normally sys.getfilesystemencoding reports utf8, but launching python from shell, starting an application from shell or launching an application with the SailfishIDE debugger, it reports ascii.

PRECONDITIONS:

Have an application with pyotherside that writes sys.getfilesystemencoding to the journal

STEPS TO REPRODUCE:

  1. start application with the debugger from sailfish ide
  2. start normally
  3. start from shell with sailfish-qml
  4. start from shell but prefix with LANG=de_DE.UTF8

EXPECTED RESULT:

all 4 report utf8

ACTUAL RESULT:

first and third report ascii, second and fourth utf8

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

1 Like

Interesting. You wouldn’t happen to have some handy test app nearby?

No sorry, just patched something like the following into the app i’m working on (gpodder):

import sys
logger.warn("encoding: fs %s default %s"%(sys.getfilesystemencoding,sys.getdefaultencoding()) )

But as described, just start python from shell with LANG explicitly set and without

I get ascii in both cases :confused:

mine have utf8 locale right after i connect with ssh.

sdk can get remote environment values if you ask it to do so, also you can override LANG env to test different locales without altering your device settings.

I did a fresh 3.4.0.24 flash, could that be the cause for the differences?