I am trying to send Chinese characters through URL query string but they simply turn to some weird text format: %E0%B8%81%E0%B8%B3%E0%B8%AD%E0%B8
when I get them via location.search
. How to get them correctly?
I think your Chinese characters are being URL encoded.
Are you looking for the unescape function to decode them?
unescape("%E0%B8%81%E0%B8%B3%E0%B8%AD%E0%B8")
the text are url encoded, you should decode it first. Take a look at this page: URLDecode , select gbk
to decode. There are corresponding functions in all popular languages to decode it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.