[GH-ISSUE #429] UTF8 corruption when replying as text to HTML message part #357

Closed
opened 2026-02-25 21:34:50 +03:00 by kerem · 8 comments
Owner

Originally created by @jasonmunro on GitHub (Sep 16, 2020).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/429

Originally assigned to: @jasonmunro on GitHub.

  1. Send an HTML email from Gmail with http://kermitproject.org/utf8.html to Cypht
  2. Reply to the HTML part as TEXT and the reply text is mangled.

This only happens when replying to an HTML prt with outbound mail set to TEXT. All other combinations work fine.

Originally created by @jasonmunro on GitHub (Sep 16, 2020). Original GitHub issue: https://github.com/cypht-org/cypht/issues/429 Originally assigned to: @jasonmunro on GitHub. 1. Send an HTML email from Gmail with http://kermitproject.org/utf8.html to Cypht 2. Reply to the HTML part as TEXT and the reply text is mangled. This only happens when replying to an HTML prt with outbound mail set to TEXT. All other combinations work fine.
kerem 2026-02-25 21:34:50 +03:00
Author
Owner

@jasonmunro commented on GitHub (Sep 16, 2020):

Update - actually replying to the HTML part when using outbound of MARKDOWN also fails.

<!-- gh-comment-id:693636186 --> @jasonmunro commented on GitHub (Sep 16, 2020): Update - actually replying to the HTML part when using outbound of MARKDOWN also fails.
Author
Owner

@marclaporte commented on GitHub (Sep 16, 2020):

With 1.9 million downloads, maybe this can help: https://packagist.org/packages/soundasleep/html2text

<!-- gh-comment-id:693694351 --> @marclaporte commented on GitHub (Sep 16, 2020): With 1.9 million downloads, maybe this can help: https://packagist.org/packages/soundasleep/html2text
Author
Owner

@jasonmunro commented on GitHub (Sep 17, 2020):

php: >=7.0

<!-- gh-comment-id:693736754 --> @jasonmunro commented on GitHub (Sep 17, 2020): > php: >=7.0
Author
Owner

@jasonmunro commented on GitHub (Sep 17, 2020):

@marclaporte should be fixed in master. While we can't use the package you posted, it is a good reference for potential issues around HTML -> TEXT conversion. I happened to find this fix elsewhere but still very useful so thanks for the post. I will leave this open for you to confirm on your end the problem is resolved.

Thanks!

<!-- gh-comment-id:693753251 --> @jasonmunro commented on GitHub (Sep 17, 2020): @marclaporte should be fixed in master. While we can't use the package you posted, it is a good reference for potential issues around HTML -> TEXT conversion. I happened to find this fix elsewhere but still very useful so thanks for the post. I will leave this open for you to confirm on your end the problem is resolved. Thanks!
Author
Owner

@marclaporte commented on GitHub (Sep 17, 2020):

About "php: >=7.0": We can use an older version https://packagist.org/packages/soundasleep/html2text#0.5.0 until our requirements increase.

<!-- gh-comment-id:694400048 --> @marclaporte commented on GitHub (Sep 17, 2020): About "php: >=7.0": We can use an older version https://packagist.org/packages/soundasleep/html2text#0.5.0 until our requirements increase.
Author
Owner

@marclaporte commented on GitHub (Sep 17, 2020):

Ah wait, older versions are licensed EPL-1.0, and I don't know off-hand if it's compatible. In any case, we'll sooner or later increase minimum requirements, and the lib will become an option at that point: https://github.com/jasonmunro/cypht/issues/431

<!-- gh-comment-id:694457213 --> @marclaporte commented on GitHub (Sep 17, 2020): Ah wait, older versions are licensed EPL-1.0, and I don't know off-hand if it's compatible. In any case, we'll sooner or later increase minimum requirements, and the lib will become an option at that point: https://github.com/jasonmunro/cypht/issues/431
Author
Owner

@jasonmunro commented on GitHub (Sep 17, 2020):

Well what we have works fine for now and honestly is not very different than what this third party code does.

<!-- gh-comment-id:694460117 --> @jasonmunro commented on GitHub (Sep 17, 2020): Well what we have works fine for now and honestly is not very different than what this third party code does.
Author
Owner

@marclaporte commented on GitHub (Sep 17, 2020):

@jasonmunro understood.

I think we can close this issue. It works for me with the newest code.

Thanks!

<!-- gh-comment-id:694471950 --> @marclaporte commented on GitHub (Sep 17, 2020): @jasonmunro understood. I think we can close this issue. It works for me with the newest code. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#357
No description provided.