Program in snap package may try open file and path contain non-English 
letters.
What I did.
----------------------------
snapcraft.yaml:
apps:
  app-name:
    command: usr/bin/run.sh
    plugs: [network, network-bind, x11, home, unity7]


  integration:
   plugin: nil
   stage-packages:
    - ttf-wqy-zenhei  # china
    - fonts-kacst  # arabic
    - locales
    - locales-all
    - libc-bin # for localedef
     .......
----------------------------

script-wrapper usr/bin/run.sh contain

#=============================
export I18NPATH=$SNAP/usr/share/i18n
export LOCPATH=$SNAP_USER_DATA
export LC_ALL=$LANG
LANG1=$(echo $LANG | cut -f1 -d.)
ENC=UTF-8
LOC="$LANG"
# generate a locale so we get properly working charsets and graphics
if [ ! -e $SNAP_USER_DATA/$LOC ]; then
$SNAP/usr/bin/localedef --prefix=$SNAP_USER_DATA -f $ENC -i $LANG1 $SNAP_USER_DATA/$LOC
fi
#=============================


There is an easier way?
--
Best regards,
vasilisc

--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to