What I want
- I want to do Google Search from Mac terminal(zsh).
- The search query includes Japanese Character.
Error
In Mac terminal (zsh), I run this script:
username@usernamenoAir ~ % open -a "Google Chrome" "https://google.co.jp/search?q=東京+天気"
Then, this error occurs:
The file /Users/username/https:/google.co.jp/search?q=東京+天気 does not exist.
What I tried
- If the query parameter (after
q=
) only includes alphabet (no Japanese), it works.
username@usernamenoAir ~ % open -a "Google Chrome" "https://google.co.jp/search?q=foo+bar"
% -> ok. Chrome browser launches and returns a search result.
- Japanese Character works properly in another situation like the following.
username@usernamenoAir ~ % echo 東京
東京
What is wrong? Any information would be appreciated.
Informations
I use zsh 5.8 (x86_64-apple-darwin20.0).