When encoding Python 3 URL, English is not encoded.

Asked 2 years ago, Updated 2 years ago, 85 views

I coded it like below. When I google it, others can't do Korean, but I can do it in Korean without encoding it like cp949, but I can't

Why can't I encode in English while Korean is encoded in Korean? I want to encode English as well.

Oh, and I didn't specify safe. / Why don't you encode text or \text? How do you do that?

from urllib import parse

string = '\'abcd/\''
encoding = parse.quote(string)
decoding = parse.unquote(encoding)
print(encoding)  # %27abcd/%27
print(decoding)  # 'abcd/'

a two-line summary

python urllib

2022-09-21 12:16

1 Answers


2022-09-21 12:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.