termux-packages
termux-packages copied to clipboard
lftp package does not accept umlauts as input
Trying to cd
into a directory that contains umlauts fails because lftp does not accept umlauts as input.
This seems to be an issue of the package lftp
rather than Termux or the patches applied in termux packaging. Maybe you can open an issue there?
There seems to be also answers on Google already. You can check them out.
Using lftp-4.9.1
packge on my Gentoo Linux PC systems does not reveal this kind of issue. I just tried the same with Gentoo's lftp package that I did with the termux lftp package: I connected to my sftp server and successfully changed into the same directory with umlauts I cannot change into with termux lftp. So I rather supect this being a build issue that needs to be solved on your side than a lftp upstream issue.
Works for me (Android 8.1.0 aarch64) when I set environment variables LANG
and LC_ALL
to C.UTF-8
:
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please share the output of termux-info
.
Not sure but I suspect this is related to locale bugs in Android 7.
Here's my termux-info
output:
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=17964
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
Updatable packages:
All packages up to date
termux-tools version:
1.34.1
Android version:
13
Kernel build information:
Linux localhost 4.14.113-25367478 #1 SMP PREEMPT Mon Nov 28 10:13:31 +07 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G715FN
So, is this still reproducible for the author? Not for me as I wrote before, and apparently not for anyone in our packaging team.
Yes, it's still reproducible. As soon as I try to type an umlaut within lftp my smartphone vibrates and no character is being printed.
Within termux itself I can successfully type any umlauts (äöüÄÖÜ
). I can also successfully do this in nano and vim. I have absolutely no clue what's different when using lftp but I'd happily provide more information if requested.
First it needs to narrow down the problem. According to the author, this happens on Termux app terminal. I want to know if this also reproduces outside of Termux app terminal, e.g. when using any X11 terminal program on VNC server or Termux X11, or when SSHing from some GNU/Linux environment.
I personally cannot confirm the reproducibility as I do not have access to environment where umlauted letters can be typed on Android. Note that my "worksforme" comment in https://github.com/termux/termux-packages/issues/5479#issuecomment-980453044 is made for a case when SSHing from outside. Any comment from contributor is welcome who can confirm this. The "help wanted" label already implies that though.
I tested this on device, Termux app version 0.118.0 from F-Droid, Android 8.1.0 aarch64, and I suspect yet again that this is due to incorrect setting of locale env vars. I can type umlauted letters in lftp
session by German keyboard from Gboard, with the default value of LANG
env var that is en_US.UTF-8
. After I unset LANG
, however, the same phenomenon happens as described by the author; the device vibrates and nothing is input when an umlauted letter is typed in.
I would like the author to share the printenv
output, just in case.
Here's my printenv
:
DEX2OATBOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/knoxsdk.jar:/system/framework/uibc_java.jar:/system/framework/esecomm.jar:/apex/com.android.i18n/javalib/core-icu4j.jar
TERMUX_MAIN_PACKAGE_FORMAT=debian
EXTERNAL_STORAGE=/sdcard
HOME=/data/data/com.termux/files/home
TERMUX_APP_PID=22056
BOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/knoxsdk.jar:/system/framework/uibc_java.jar:/system/framework/esecomm.jar:/apex/com.android.i18n/javalib/core-icu4j.jar:/apex/com.android.adservices/javalib/framework-adservices.jar:/apex/com.android.adservices/javalib/framework-sdksandbox.jar:/apex/com.android.appsearch/javalib/framework-appsearch.jar:/apex/com.android.btservices/javalib/framework-bluetooth.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.ondevicepersonalization/javalib/framework-ondevicepersonalization.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.permission/javalib/framework-permission-s.jar:/apex/com.android.scheduling/javalib/framework-scheduling.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.tethering/javalib/framework-connectivity.jar:/apex/com.android.tethering/javalib/framework-connectivity-t.jar:/apex/com.android.tethering/javalib/framework-tethering.jar:/apex/com.android.uwb/javalib/framework-uwb.jar:/apex/com.android.wifi/javalib/framework-wifi.jar:/apex/com.samsung.android.ipm/javalib/framework-samsung-ipm.jar:/apex/com.samsung.android.shell/javalib/framework-samsung-privilege.jar
COLORTERM=truecolor
TMPDIR=/data/data/com.termux/files/usr/tmp
TERMUX_VERSION=0.118.0
TERM=xterm-256color
ANDROID_DATA=/data
PATH=/data/data/com.termux/files/usr/bin
TERMUX_APK_RELEASE=F_DROID
ANDROID_ROOT=/system
ANDROID_I18N_ROOT=/apex/com.android.i18n
LANG=de_DE.UTF-8
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
PREFIX=/data/data/com.termux/files/usr
ANDROID_TZDATA_ROOT=/apex/com.android.tzdata
SHELL=/data/data/com.termux/files/usr/bin/zsh
TERMUX_IS_DEBUGGABLE_BUILD=0
PWD=/data/data/com.termux/files/home
ANDROID_ART_ROOT=/apex/com.android.art
LOGNAME=u0_a40
SHLVL=1
OLDPWD=/data/data/com.termux/files/home
LANGUAGE=de_DE.UTF-8
LC_CTYPE=de_DE.UTF-8
TZ=Europe/Berlin
RSYNC_OLD_ARGS=1
RSYNC_PROTECT_ARGS=0
EDITOR=nano
_=/data/data/com.termux/files/usr/bin/printenv
OK. I can reproduce this with LANG=de_DE.UTF-8
. This is unexpected to me, because I assume that every *.UTF-8
is treated equal.
OK. It is by implementation of setlocale(3)
in Bionic libc; only "C.UTF-8"
and "en_US.UTF-8"
are the supported locale strings for the UTF-8 locale.
So this is not a bug. The author should change the setting of locale env vars. For example, setting LC_CTYPE
as C.UTF-8
will be sufficient:
export LC_CTYPE=C.UTF-8