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
replace ToASCII with mime base64 #197
Conversation
I fixed the static check failure in #198 -- that should go away if you rebase. We'll need to update the golden files, please run the unit tests, inspect the output and run |
81e266c
to
d9fb44a
Compare
it fixes non ascii attach names such as cyrillic
I hope how it's right order of commits |
Looks like it picked up my PR, but no changes to the golden files:
|
I see, those tests checks file names got from ToAscii function witch replace some symbols to similar, but it is not keep original file names. Maybe I should replace golden files? |
Yes, we should update the golden files if the new output looks correct. Something that I didn't realize when initially reviewing this PR, is that BEncode will always to base64. That makes it difficult to read an ASCII filename when looking at the raw text. I don't think we should do this. Instead, please use selectTransferEncoding in encode.go to pick the encoder. That will allow us to pass through pure ASCII unchanged, use q-encoding for filenames with a few special characters, or b-encoding for ones with a majority. |
Do you plan to keep working on this? Otherwise I'll take a crack at it. |
I'm sorry for delay. I made changes in golden files and add switch case for file name encodings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
it fixes non ascii attach names such as cyrillic