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

mb_convert_encoding(): Argument #3 contains invalid encoding "WINDOWS-1258" #137

Closed
gnomii opened this issue Aug 30, 2021 · 3 comments
Closed

Comments

@gnomii
Copy link

gnomii commented Aug 30, 2021

Describe the bug
An PHP error when tries to convert the encoding of content:

FastCGI sent in stderr: "PHP message: CantGetMessageList[201]PHP message: mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "WINDOWS-1258" @ snappymail/v/2.6.2/app/libraries/MailSo/Base/Utils.php#283" while reading response header from upstream

To Reproduce
Receive an email with charset "windows-1258". I think the email client is on windows, but I have not windows system. I can not test on windows

Desktop (please complete the following information):

  • SnappyMail Version 2.6.2
  • PHP 8.0.8
the-djmaze pushed a commit that referenced this issue Aug 31, 2021
@the-djmaze
Copy link
Owner

I've made a change to remove the hardcoded encodings list and use the real list with aliases.
You can try the changed file if it helps.

@gnomii
Copy link
Author

gnomii commented Aug 31, 2021

It seems ok. I have no error in logs.

Thanks you very much

@the-djmaze
Copy link
Owner

Great, now you can read Vietnamese.
It's indeed Windows OS (which i don't have either), and IBM names it cp1258 and is 99% cp1252/Windows-1252.

It's really oldschool (yes you Outlook Word processor) and most e-mails should be UTF-7 or UTF-8 to properly write vietnamese (or any other language that does not fit in the ASCII table).

But for now, it just ignores the encoding when it's not in the mb_* list

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

No branches or pull requests

2 participants