mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
FDroidPopen must have a locale to support UTF-8 filenames
`fdroid update` should be able to handle any valid filename (hopefully aapt doesn't barf on them). To handle that, the environment where the shell commands are run in needs to have a UTF-8 locale set. If LANG is not set, things default to ASCII and UTF-8 filenames fail. This also renames test APK with lots of Unicode chars as a test case. closes #167
This commit is contained in:
parent
82e2689246
commit
1be263e870
4 changed files with 25 additions and 1 deletions
|
@ -1794,7 +1794,8 @@ def set_FDroidPopen_env(build=None):
|
|||
set up the environment variables for the build environment
|
||||
|
||||
There is only a weak standard, the variables used by gradle, so also set
|
||||
up the most commonly used environment variables for SDK and NDK
|
||||
up the most commonly used environment variables for SDK and NDK. Also, if
|
||||
there is no locale set, this will set the locale (e.g. LANG) to en_US.UTF-8.
|
||||
'''
|
||||
global env, orig_path
|
||||
|
||||
|
@ -1806,6 +1807,15 @@ def set_FDroidPopen_env(build=None):
|
|||
for k, v in config['java_paths'].items():
|
||||
env['JAVA%s_HOME' % k] = v
|
||||
|
||||
missinglocale = True
|
||||
for k, v in env.items():
|
||||
if k == 'LANG' and v != 'C':
|
||||
missinglocale = False
|
||||
elif k == 'LC_ALL':
|
||||
missinglocale = False
|
||||
if missinglocale:
|
||||
env['LANG'] = 'en_US.UTF-8'
|
||||
|
||||
if build is not None:
|
||||
path = build.ndk_path()
|
||||
paths = orig_path.split(os.pathsep)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue