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

Mail::Encodings.value_decode cannot decode MS950 charset. #1406

Open
tonytonyjan opened this issue Aug 16, 2020 · 0 comments · May be fixed by #1417
Open

Mail::Encodings.value_decode cannot decode MS950 charset. #1406

tonytonyjan opened this issue Aug 16, 2020 · 0 comments · May be fixed by #1417

Comments

@tonytonyjan
Copy link

tonytonyjan commented Aug 16, 2020

string = '=?MS950?B?rue26aWrrEapssS1ue6nvaXms3G5SLNX?= =?MS950?B?wMvBfLFNsM/Ay8F8pEirSL1jpmGnfcXn?= =?MS950?B?w9KhXaa5q0il86ywqHSyzqbbsMq1b7Bl?= =?MS950?B?oUG90MJJv++kVaTos3O1sqFBpMWmXrRfKQ==?='
Mail::Encodings.value_decode string
# => "�������F�����������q�H�W���|�M�����|�H�H�c�a�}�����]���H�����t�������o�e�A���I���U���s���A���^�_)"

Mail::Encodings.value_decode string.gsub('MS950', 'CP950')
# => "桃園市政府警察局交通違規檢舉專區檢舉人信箱地址驗證(此信件為系統自動發送,請點選下方連結,勿回復)"

Maybe we can alias MS950 to CP950?

tonytonyjan added a commit to tonytonyjan/mail that referenced this issue Oct 15, 2020
@tonytonyjan tonytonyjan linked a pull request Oct 15, 2020 that will close this issue
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 a pull request may close this issue.

1 participant