[Bug]: SERIOUS problem with accents
Current Behavior
After adding zsh, oh-my-zsh, oh-my-posh and fish to my Linux, among various other modifications, suddenly waveterm started having a hell of a problem with word accents that took me several hours! The directory address, which appears at the command prompt, gave problems where there was an accent and I couldn't even enter an accent from the command line, which almost made me abandon waveterm.
I've tried everything, I've uninstalled everything and reinstalled it several times and nothing, I've fiddled with encondig, made a lot of commands with locale and locales, export LC_ALL, LANG, edited .bashrc and .profile, changed the language of the entire computer several times, fiddled with /usr/local/share/i18n/SUPPORTED and many others directories line /etc/ and /opt/, UTF-8, utf8, installing waveterm without snap by other means using the .deb package and AppImage (not working anyway), install language-pack and I received messages with iconv.
The terminal displayed errors such as:
wave terminal iconv: illegal input sequence at position 83
Error converting string from ANSI_X3.4-1968 to UTF-8
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
warning: The LOCPATH variable is set to "/usr/lib/locale"
locale: Cannot set LC_COLLATE to default locale: No such file or directory
Expected Behavior
en_US or en_US.UTF-8 supports accents and the terminal should display them and allow you to enter them on the command line without any problems how showed below:
Steps To Reproduce
I made a lot of modifications installing the zsh among other programmes to enrich my terminal, so I don't know where exactly it came from.
Wave Version
Client Version 0.11.0 (202501250008)
Platform
Linux
OS Version/Distribution
Ubuntu 24.10
Architecture
arm64
Anything else?
The solution to the problem is shown in the next post 🙂
Questionnaire
- [ ] I'm interested in fixing this myself but don't know where to start
- [x] I would like to fix and I have a solution
- [ ] I don't have time to fix this right now, but maybe later
The error was in the folder /usr/lib/locale. Even if you make all kinds of changes to your computer, only the C.utf8 and locale-archive remains inside it:
dns@dns-pc:~$ ls /usr/lib/locale
C.utf8 locale-archive
The solution is the command below [UnixStackExchange]:
sudo locale-gen --purge --no-archive
With this command the folder is filled with other language files that support accents and special characters:
dns@dns-pc:~$ ls /usr/lib/locale/
C.utf8 en_AU.utf8 en_CA.utf8 en_GB.utf8 en_IE.utf8 en_IN en_NZ.utf8 en_SG.utf8 en_ZA.utf8 en_ZW.utf8 pt_PT.utf8
en_AG en_BW.utf8 en_DK.utf8 en_HK.utf8 en_IL en_NG en_PH.utf8 en_US.utf8 en_ZM pt_BR.utf8