EC-CUBE / EC-CUBE/ec-cube3

charset_iso_2022_jp:true時にマイページ>ご注文履歴のメール配信履歴が文字化けする

Open
#30 3 comments 0 reactions 0 assignees View on GitHub
bug:Middle
Dominant language
PHP
Stars
13
Forks
26
PR merge metrics
No merged PRs in 30d

Description

## 概要(Overview)

開発コミュニティより

https://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=19194&forum=1&post_id=82819#forumpost82819

## 再現手順(Procedure)

```
EC-CUBEから送信されるメールの文字コードを ISO-2022-JP にするために、mail.yml の charset_iso_2022_jp オプションを「true」にしました。

メールの文字コードは意図通りに ISO-2022-JP となったのですが、

マイページ>ご注文履歴

のメール配信履歴が文字化けしてしまいました。

メール配信履歴のDB保存先である dtb_mail_history.mail_body の中身も文字化けしています。

ちなみに、mail.yml の charset_iso_2022_jp オプションを「false」とすると、メール配信履歴は文字化けしないことは確認済みです。

おそらくなのですが、ISO-2022-JP に変換されたメールボディの文字列をそのまま dtb_mail_history.mail_body に保存しているからだと思います。保存前に UTF-8 に戻せば問題は解決するかと思います。
```

### 環境 (environment)
+ EC-CUBE: 3.0.14
+ PHP: 5.6.30
+ DB:
- PostgreSQL x.x.x
- MySQL 5.6.36

## 関連情報 (Ref)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the mail.yml charset_iso_2022_jp option through the code that stores mail history in dtb_mail_history.mail_body. Reproduce the issue with the option enabled and inspect the value shown under My Page > Order History. Done means ISO-2022-JP email delivery still works while the stored and displayed mail history remains readable.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.