Using URL encoding will cause Chinese characters to display as garbled text, making it impossible to correctly display images with Chinese file paths. By using the urllib.parse.unquote() method to restore the garbled URL, the Chinese characters can be displayed properly.
Using URL encoding will cause Chinese characters to display as garbled text, making it impossible to correctly display images with Chinese file paths. By using the
urllib.parse.unquote()
method to restore the garbled URL, the Chinese characters can be displayed properly.