Author Topic: Japanese character encoding aliases  (Read 3603 times)

Offline tyano

  • Newbie
  • *
  • Posts: 1
Japanese character encoding aliases
« on: January 03, 2016, 02:45:38 AM »
Hello,

I am Yano, a user of roundcube at my home in Japan.

Some Japanese characters are not shown as expected while mail clients (ex. ThunderBird) can show them as expected.

I found the reason and a way to fix it.

The mails in ISO-2022-JP encoding can include characters not in ISO-2022-JP.
These characters are included in the encoding ISO-2022-JP-MS.

I modified program/lib/Roundcube/rcube_charset.php:
line 235:
        if ($mbstring_list !== false) {
            $aliases['WINDOWS-1257'] = 'ISO-8859-13';
 +            $aliases['JIS'] = 'ISO-2022-JP-MS';
 +           $aliases['ISO-2022-JP'] = 'ISO-2022-JP-MS';
 +           $aliases['EUC-JP'] = 'EUCJP-WIN';
 +           $aliases['SJIS'] = 'SJIS-WIN';
 +          $aliases['SHIFT_JIS'] = 'SJIS-WIN';

I add the lines with + marks after line 236. I am using roundcube 1.1.4.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Japanese character encoding aliases
« Reply #1 on: January 03, 2016, 03:21:35 AM »
You should submit a pull request https://github.com/roundcube/roundcubemail