I have an issue that exists only on the MacOs. It works fine on Windows. I am using python3.
Here is the code:
# coding=utf-8
# using address you inputed to open a web map site
import webbrowser, sys, pyperclip
if len(sys.argv) > 1:
#get address from command line.
address = ' '.join(sys.argv[1:])
else:
#get address from clip board.
address = pyperclip.paste()
webbrowser.open('https://ditu.amap.com/search?query=' + address)
For example: copy "New York" works.
But when you copy "和卉家园" which is a Chinese address, it will be a mojibake (garbled text),and this problem exists only in MacOs.
I have no idea how to solve it, please help me ,Thank you!