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

Generalize charset converting #151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linniksa
Copy link
Contributor

No description provided.

@linniksa linniksa force-pushed the patch-generalize-charset-convert branch 5 times, most recently from 1dda1c3 to 7cb5de0 Compare August 28, 2015 14:08
@linniksa linniksa force-pushed the patch-generalize-charset-convert branch from 7cb5de0 to f2722da Compare September 24, 2015 01:08
@adriansuter
Copy link

Commit confirmed. Needed this, as in the old version, charset "windows-1252" (sent by my Windows Phone Mail Client) would not be recognized as being "Windows-1252" (as returned by mb_list_encodings() at line 526).

@wiiiteek
Copy link

+1 on this. @tedivm please merge it. @linniksa provided very good solution of this problem.

ApexWire added a commit to ApexWire/Fetch that referenced this pull request Apr 15, 2016
- The minimum version of php 5.4
- Add rawBody in Message
- Add changelog.md
- README.md rename README_EN.md. Add README.md - russian
- Merge pull request [tedious#147](tedious#147) from linniksa/patch-mime-decoder
- Changes from the pull request [tedious#151](tedious#151)
@ApexWire
Copy link

@klammbueddel
Copy link

klammbueddel commented Apr 18, 2016

I just ran into an issue, where a 10K e-mail could not be converted because only 2 Bytes failed the mb_check_encoding function due to invalid characters. I think it is safe to just call mb_convert_encoding and hope the best instead of converting nothing.

$this->assertSame('?これ', Message::charsetConvert(
    implode(array_map('chr', array(0x1B, 0x24, 0x42, 0x2D, 0x21, 0x24, 0x33, 0x24, 0x6C, 0x1B, 0x28, 0x42))),
        'iso-2022-jp',
        'utf-8'
    ));

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.

5 participants