728x90 반응형 encode2 urllib.parse.quote, urllib.parse.urlencode urllib.parse.quote는 URL에서 한글 및 특수 문자를 퍼센트 인코딩(percent encoding)으로 변환하는 함수. URL에 대한 이해가 없다면 다음을 참고:https://dsaint31.tistory.com/entry/CE-URL-URI-and-UNC [CE] URL, URI and UNCURI or URLURI는 Uniform Resource Identifier의 abbreviation 이고, URL은 Uniform Resource Locator의 abbreviation임.인터넷 또는 WAN 상에서 특정 resource(HTML, 이미지, 동영상 등을 resource라고 지칭함)에 접근할 목적으로 해dsaint31.tistory.com기본 문법urllib.parse.quote(st.. 2025. 8. 6. [Python] Unicode and Python: encode and decode Python에서 encode와 decode: str과 bytesencode : str 에서 bytes 로decode : bytes 에서 str 로 이때 encoding 방식이 필요하며,해당 encoding 방식에 따라 동일한 str 객체라도 다른 bytes 객체로 변환된다.참고로, str 객체가 같은 경우엔 Unicode의 codepoint (=코드값)는 같음.하지만, encoding방식에 따라 대응되는 bytes 객체는 다름.bytes 대신 bytearray 도 가능. 참고 : Unicode에서의 encoding이란Unicode에서 문자열은 일종의 sequence of code points 임. (코드값들의 sequence)이를 저장 및 전송, 또는 메모리에 올리기 위해선 일종의 code unit 으로.. 2024. 1. 16. 이전 1 다음 728x90 반응형