Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[naver] EUC-KR encoding issue in old image URLs #5126

Merged

Conversation

9CB797FF-9380-45F2-BB88-BB86CA0E32BF
Copy link
Contributor

@9CB797FF-9380-45F2-BB88-BB86CA0E32BF 9CB797FF-9380-45F2-BB88-BB86CA0E32BF commented Jan 28, 2024

Around October 2016, the image server URL format and file name encoding changed from EUC-KR to UTF-8. Modified to detect old URL format and decode image URLs into EUC-KR

@9CB797FF-9380-45F2-BB88-BB86CA0E32BF
Copy link
Contributor Author

Wait a minute, I found a post from 2010 in which the image URL was encoded in UTF-8.

@9CB797FF-9380-45F2-BB88-BB86CA0E32BF
Copy link
Contributor Author

My guess was wrong. Regardless of upload date or URL format, the file name field is either EUC-KR or UTF-8.

@9CB797FF-9380-45F2-BB88-BB86CA0E32BF
Copy link
Contributor Author

9CB797FF-9380-45F2-BB88-BB86CA0E32BF commented Jan 30, 2024

problem solved.
Encoding was checked for all image URLs, and full file names were obtained at the expense of execution speed.

@mikf mikf changed the title [naver]EUC-KR encoding issue in old image URLs [naver] EUC-KR encoding issue in old image URLs Mar 5, 2024
Around October 2010, the image server URL format and file name
encoding changed from EUC-KR to UTF-8.
Modified to detect old URL format and decode image URLs into EUC-KR

- (lint with flake8) Customize conditions
  Wrap lines smaller than 79 characters

- (lint with flake8) Customize conditions (2nd try)
  - One import per line
  - Indent on consecutive lines

- (lint with flake8) Customize conditions (3rd try)
  - E128 continuation line under-indented for visual indent
  - E123 closing bracket does not match indentation of opening bracket's line

- Update naver.py
  Check encoding for all image URLs
@mikf mikf merged commit a71cdab into mikf:master Mar 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants