-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Chinese input methods cause errors when entering Chinese content in the Webstorm terminal. #2012
Comments
Judging by the issue you've opened with webstorm, and that this doesn't occur in other terminals, I suspect it's just a webstorm problem. I haven't heard of anyone else having problems with Chinese input methods |
The panic is reproducible with the following command. $ a='\x80' atuin search
thread 'main' panicked at library/std/src/env.rs:171:83:
called `Result::unwrap()` on an `Err` value: "\x80"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace This is probably related: https://doc.rust-lang.org/std/env/fn.vars.html#panics This means that any Rust programs using This implies that when a user switches the locale by setting e.g. |
Hm that doesn't reproduce the issue for me 🤔 Is there a specific terminal or setup you're using? |
|
Ah I see, got it. Thanks
It's actually just the usage of std::env::vars, which uses a String. These require utf8 encoding.
Regardless of this, I'm still curious as to why this only happens with webstorm (for OP)
|
This is just my guess, but I think the WebStorm terminal sends the user input with an encoding different from UTF-8. Then, the shell receives the data and stores it in an environment variable. This behavior might be caused by just the user's configuration for the terminal encoding, or it might be the WebStorm terminal's issue with handling the data from the system's input method. So, I think the reported problem could be solved if the WebStorm terminal is properly configured or fixed. Nevertheless, I see it as also a problem that crate For the non-UTF-8 environment variables that Atuin actually uses, I'm not sure about the desired behavior. It may just ignore the environment variable or print a warning message. |
What did you expect to happen?
I can't tell if the problem is webstorm or atuin, I've committed issuse in webstorm
https://youtrack.jetbrains.com/issue/WEB-67048/Chinese-input-method-causes-other-program-errors-when-entering-Chinese-content-in-the-terminal
What happened?
This problem occurs when typing Chinese content with Chinese input methods, and only occurs in the webstorm terminal.
CleanShot.2024-05-09.at.11.55.21.mp4
Atuin doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: