diff --git native/linux/latest/usr/bin/josm-latest native/linux/latest/usr/bin/josm-latest
index b7887d78f7..58cce230aa 100755
|
|
|
if [ -f "/etc/default/${JOSM_VERSION}" ]; then
|
| 59 | 59 | . "/etc/default/${JOSM_VERSION}" |
| 60 | 60 | fi |
| 61 | 61 | |
| | 62 | # Java decodes file names with the character set of the locale, and -Dsun.jnu.encoding |
| | 63 | # cannot override it. If the locale is C/POSIX, or cannot be set at all - typically a |
| | 64 | # UTF-8 LANG whose locale is not installed, as in a Flatpak sandbox - file names are |
| | 65 | # decoded as ASCII and opening a folder that holds a non-ASCII name fails with |
| | 66 | # InvalidPathException. Fall back to C.UTF-8 then, which is built into glibc 2.35 and |
| | 67 | # later. This does not change the language of JOSM: when the locale cannot be set, Java |
| | 68 | # already falls back to English. LC_ALL is needed, as setlocale() fails as a whole if |
| | 69 | # any category names a locale that is not installed. |
| | 70 | if { [ -n "$(locale 2>&1 >/dev/null)" ] || [ "$(locale charmap 2>/dev/null)" = "ANSI_X3.4-1968" ]; } \ |
| | 71 | && [ -z "$(LC_ALL=C.UTF-8 locale 2>&1 >/dev/null)" ]; then |
| | 72 | export LC_ALL=C.UTF-8 |
| | 73 | fi |
| | 74 | |
| 62 | 75 | # If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things. |
| 63 | 76 | if [ "$(LC_ALL=C LANG=C free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then |
| 64 | 77 | # But don't set anything if JAVA_OPTS is already set. |
diff --git native/linux/tested/usr/bin/josm native/linux/tested/usr/bin/josm
index f8d8f2e498..b84a517f8e 100755
|
|
|
if [ -f "/etc/default/${JOSM_VERSION}" ]; then
|
| 59 | 59 | . "/etc/default/${JOSM_VERSION}" |
| 60 | 60 | fi |
| 61 | 61 | |
| | 62 | # Java decodes file names with the character set of the locale, and -Dsun.jnu.encoding |
| | 63 | # cannot override it. If the locale is C/POSIX, or cannot be set at all - typically a |
| | 64 | # UTF-8 LANG whose locale is not installed, as in a Flatpak sandbox - file names are |
| | 65 | # decoded as ASCII and opening a folder that holds a non-ASCII name fails with |
| | 66 | # InvalidPathException. Fall back to C.UTF-8 then, which is built into glibc 2.35 and |
| | 67 | # later. This does not change the language of JOSM: when the locale cannot be set, Java |
| | 68 | # already falls back to English. LC_ALL is needed, as setlocale() fails as a whole if |
| | 69 | # any category names a locale that is not installed. |
| | 70 | if { [ -n "$(locale 2>&1 >/dev/null)" ] || [ "$(locale charmap 2>/dev/null)" = "ANSI_X3.4-1968" ]; } \ |
| | 71 | && [ -z "$(LC_ALL=C.UTF-8 locale 2>&1 >/dev/null)" ]; then |
| | 72 | export LC_ALL=C.UTF-8 |
| | 73 | fi |
| | 74 | |
| 62 | 75 | # If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things. |
| 63 | 76 | if [ "$(LC_ALL=C LANG=C free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then |
| 64 | 77 | # But don't set anything if JAVA_OPTS is already set. |