termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
35.84k stars 3.77k forks source link

[Bug]: Symbol Input Exception (★☆) #3230

Closed zixijian closed 1 year ago

zixijian commented 1 year ago

Problem description

I played Muds game with tintin++ at Termux.

When I start tintin++ with screen and set the GBK encoding,Typing symbols such as ★☆ displays ??. But The receiving server sent the symbol or read the scripts can be displayed normally.

I tried to use ssh to connect to other linux environments, and with the same setup, Termux can normally output symbols such as ☆★.

BTW:Can termux display these characters ★☆ in double-width? As far as I know, Terminal emulators such as iterm2 have this feature, which is very important for Mud.

Screenshot_2023-02-04-09-03-09-056_com termux-edit

Steps to reproduce the behavior.

pkg in screen tintin++ -y
echo defencoding GBK > ~/.screenrc
screen tt++
#config charset gbk

Then try to enter symbols such as ★☆.

What is the expected behavior?

This prevents me from entering these symbols in the gbk environment.

System information

Termux Variables:
TERMUX_API_APP__VERSION_NAME=0.50.1+2c6674f
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/~~4mNmopEp58PCsKoQWsh8IQ==/com.termux-Fd2Z9PnFaX7urqEdwOzptA==/base.apk
TERMUX_APP__APK_RELEASE=UNKNOWN
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=true
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=3336
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c244,c256,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c244,c256,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10244
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=118
TERMUX_APP__VERSION_NAME=0.118.0+8421173
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0+8421173
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main
Updatable packages:
All packages up to date
termux-tools version:
1.36.1
Android version:
13
Kernel build information:
Linux 11tp 5.10.101-android12-9-00027-g1292f517889e-ab8602202 #1 SMP PREEMPT Mon May 16 11:18:04 UTC 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
22041216C
2096779623 commented 1 year ago

I can't reproduce it.

No use screen: Screenshot_20230209-123909_Termux Use screen: Screenshot_20230209-124032_Termux

Try to remove defencoding GBK in ~/.screenrc, it won't have this problem.

2096779623 commented 1 year ago

Added GBK config in ~/.screenrc : Screenshot_20230209-124450_Termux

zixijian commented 1 year ago

@2096779623

Must use screen for transcoding in some Mud,I know this is normal under utf-8, but using ssh to connect to other linux environments using gbk can enter these symbols.