Closed cattokomo closed 1 year ago
Hi @UrNightmaree,
Thank you for opening an issue report :handshake: I have scheduled a triage and will update you on the progress :dart:
Please provide information about your terminal emulator :grey_question:
Thanks.
Hello @ss-o, thank you for responding my issue. 🙏
Please provide information about your terminal emulator ❔
It's Termux.
It seems to be a locale issue and encounters an escape sequence which most likely is not valid for currently set encoding. To verify this you may try:
LC_ALL="UTF-8" echo '\u2603'
LC_CTYPE="UTF-8" echo '\u2603'
LC_CTYPE="en_US.UTF-8" echo "\u2603"
The above should print a symbol or if due to missing fonts may provide empty/incorrect output, but no error should be shown, but with the following example it should show error "character not in range":
LC_CTYPE="C" echo '\u2603'
Could you please confirm that this is the case?
Source related to locale: https://wiki.archlinux.org/title/locale
I tried above but still complain about character not in range
.
Pretty sure that the error is shown because of the locale and multiple scenarios may cause this, e.g. lack of configuration, misconfiguration, corrupted files, etc.
Try the following:
Open the /etc/locale.gen
file and ensure there is a line as below and it is not prepended with a #
, then run locale-gen
(usually requires root access and executed with sudo
)
en_US.UTF-8 UTF-8
Add at the top of your .zshrc
, then run exec zsh
.
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
If the issue is not solved then check if it is caused by something in .zshrc
:
mv ~/.zshrc ~/.zshrc.backup
touch ~/.zshrc
exec zsh
echo '\u2603'
If the character not in range
error does not appear then recover .zshrc
with cp -i ~/.zshrc.backup ~/.zshrc
and remove components one by one while each time running exec zsh
and echo '\u2603'
afterward to identify what exactly causes the error.
Oh now it works, seems like I haven't setup locale.
Environment
Arch Linux proot inside Termux, zsh 5.9 (armv7l-unknown-linux-gnueabihf), zi git commit 75929e8
Reproduction steps
Expected behavior
Current behavior
Code snippet
Additional information
Screenshots:
Self-service
Have you read the Contributing Guidelines?
Are you familiar with the Contributor Covenant Code of Conduct?
Contact Details
No response