mikel / mikel/mail

text garbled for mail subject decoding

Open
#1,397 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
3.7k
Forks
934
PR merge metrics
No merged PRs in 30d

Description

https://github.com/mikel/mail/blob/8fbb17d4d5364c77cc870769d451bc2739b3a8ce/lib/mail/encodings.rb#L123-L138

here is the original data of subject
```
Subject: =?iso-2022-jp?Q?=1B=24B0F7o=3EpJs=1B=28B=5B=2D01_=1B=24?=
=?iso-2022-jp?Q?BBg=3Cj=3Bq=3B=3A1=3FMQ2q=3CR=1B=28B_=2D_=1B=24B=3B?=
=?iso-2022-jp?Q?q=3B=3A1=3FMQ=24K=24=2B=24=2B=24k=1B=28BDWH=1B=24B=24?=
=?iso-2022-jp?Q?NFs=3C=213=2BH=2F6HL3=1B=28B=5D?=
```

when i use `mail.subject`,it returns
`"案件情報[-01 �BBg

Contributor guide

Open the contributing guide

Research direction

Start with lib/mail/encodings.rb#L123-L138 and inspect how Encodings.value_decode handles folded Subject lines. Reproduce the issue with the provided ISO-2022-JP encoded subject, comparing the folded and manually concatenated forms. Done means mail.subject returns the complete Japanese subject for the original folded header.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.