On 2023-07-06 13:50, Po Lu wrote: > $XMODIFIERS, $LANG, and that of `locale-coding-system', Hi again, I reverted my change to the menu item, started Emacs, verified that I can't type ~, and performed: Shell command: echo "$XMODIFIERS, $LANG" *@im=ibus, en_SE.UTF-8* This LANG value is what I get by default, don't know where it comes from but seems correct because I mostly use English but live in Sweden. I also tried to explicitly specify LANG=en_*S**V*.UTF-8, doesn't work. As well as LANG=en_US.UTF-8 and LANG=sv_SE.UTF-8 which both work and as before LANG=C.UTF-8 which also works. I have not experienced any problems to type ~ in other applications. Seems to me that Emacs doesn't like when not using the main language for the chosen location... The value of XMODIFIER didn't change. Nor did the below variable: Describe variable: locale-coding-system locale-coding-system is a variable defined in ‘C source code’. *Its value is ‘utf-8-unix’** * Coding system to use with system messages. Also used for decoding keyboard input on X Window system, and for encoding standard output and error streams.   Probably introduced at or before Emacs version 21.1.