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

Remove GBK -> X-GBK Alias and add X-GBK -> GBK #396

Merged
merged 2 commits into from Feb 1, 2019
Merged

Remove GBK -> X-GBK Alias and add X-GBK -> GBK #396

merged 2 commits into from Feb 1, 2019

Conversation

pyatnitsev
Copy link
Contributor

@pyatnitsev pyatnitsev commented Jan 30, 2019

I have an Issue with decoding a message in GBK encoding, becouse it transform to X-GBK that not supported by iconv PHP function.

I saw this doc https://encoding.spec.whatwg.org/#encodings and this one https://dxr.mozilla.org/mozilla-central/source/dom/encoding/labelsencodings.properties and in the second document X-GBK should be transformed to GBK.

related issue #395

@Slamdunk
Copy link
Collaborator

Hi, you are right, Transcoder comes from https://dxr.mozilla.org/mozilla1.9.1/source/intl/uconv/src/charsetalias.properties which is mostly outdated by https://dxr.mozilla.org/mozilla-central/source/dom/encoding/labelsencodings.properties .

For the sake of completness, can you add to test or post here the original raw message that originated the issue (with sensitive data stripped out) please?

@pyatnitsev
Copy link
Contributor Author

I see letter with eror, but if I print body of letter to console and copy that in variable (override $text and $fromCharset) it works well...
in body: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">

@Slamdunk
Copy link
Collaborator

Slamdunk commented Jan 31, 2019

I need the output of $message->getRawMessage() please

@pyatnitsev
Copy link
Contributor Author

pyatnitsev commented Jan 31, 2019

Sorry, I can't remove all sensitive data from letter, but I have output of getRawMessage() function.
Do you need headers? I can post a part of message if it help you.

------=_Part_116476_1454027372.1548343396450
Content-Type: text/plain; charset=GBK
Content-Transfer-Encoding: base64

RGVhciAgc2lyIAoKCkkgdHJhZGUgc3RvY2tzIGluIEFtZXJpY2FuICBtYXJrZXQgZm9yIG1vcmUg
dGhhbiA1IHllYXJzIC4gIEkgd2FudCB0aGUgU3RlcmxpbmcgcGxhdGZvcm0gLiAgSSB3YW50IHRv

and begin of html-part:

------=_Part_116476_1454027372.1548343396450
Content-Type: text/html; charset=GBK
Content-Transfer-Encoding: base64

PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJz

I'm trying to reproduce this bug in my own letter sent with GBK encoding, but it works well

@Slamdunk Slamdunk merged commit 0954b14 into ddeboer:master Feb 1, 2019
@Slamdunk Slamdunk added this to the 1.7 milestone Mar 1, 2019
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.

None yet

2 participants