Bug 196017 - squirrelmail cannot convert Subject to zen-kaku kata-kana.
squirrelmail cannot convert Subject to zen-kaku kata-kana.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: squirrelmail (Show other bugs)
4.0
All Linux
high Severity high
: ---
: ---
Assigned To: Warren Togami
:
Depends On:
Blocks: 176344
  Show dependency treegraph
 
Reported: 2006-06-20 08:34 EDT by Issue Tracker
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0668
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-26 08:28:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Issue Tracker 2006-06-20 08:34:35 EDT
Description of problem:
This is a i18n bug for the latest Squirrelmail. 
Previous version of squirrelmail has no problem.

The latest squirrelmail did not convert convert Subject to "zen-kaku
kata-kana". Usually, if a user used "han-kaku kata-kana" in the body
or header, any mail application would convert it to "zen-kaku kata-kana".
The squirrelmail also should convert.

Version-Release number of selected component (if applicable):
squirrelmail-1.4.6-7.el4

How reproducible:
Always

Steps to Reproduce:

1. Please access http://dhcp-82.brisbane.redhat.com/webmail/
   user:test pass:test
2. Please send a email usging squirrelmail,
   And put "han-kaku kata-kana" for Subject.
   For example, pls see Step-1.png and Step-2.png

Actual results:
Please see the following images,
Actual_result_1.png
Actual_result_2.png

Expected results:
Expected_result_1.png
Expected_result_2.png

Additional info:
squirrelmail-1.4.3a-9.EL4 works fine, but the latest version cannot 
convert subject stinrgs.

Kind regards,
Fuchi
This event sent from IssueTracker by jnansi  [Support Engineering Group]
 issue 96115
Comment 3 Issue Tracker 2006-06-20 08:34:52 EDT
Good morning Jose-san and Jatin-san,

Thank you for your follow-up.

I've investigated this problem. the cause of the problem is 
squirrelmail did not call mb_convert_kana(). And I found that 
mb_convert_kana() had not been called in japanese_charset_xtra() 
of functions/i18n.php. mb_convert_kana() is converter, whcih 
converts "kana" one from another, "zen-kaku", "han-kaku" and 
more.

In fact, old versin 1.4.3a-9.EL4 has called mb_convert_kana() at 631 line
as follows,

    595 /*
    596  * Japanese charset extra function
    597  *
    598  */
    599 function japanese_charset_xtra() {
    600     $ret = func_get_arg(1);  /* default return value */
    <snip>
    629         case 'encodeheader':
    630             $result = '';
    631             $ret = mb_convert_kana($ret, "KV");
    632             if (strlen($ret) > 0) {

I've created a test patch, which calls mb_convert_kana() as well. 
I did want to call it with some conditions, but it is difficult. This
does
not cause a problem, because of mb_convert_kana() will work against
all strings. And I confirmed the problem has been corrected with this
patch.

--- functions/i18n.php.org      2006-06-20 09:16:15.000000000 +0900
+++ functions/i18n.php  2006-06-20 10:36:59.000000000 +0900
@@ -487,6 +487,7 @@ function japanese_charset_xtra() {
             break;
         case 'encodeheader':
             $result = '';
+           $ret = mb_convert_kana($ret, "KV");
             if (strlen($ret) > 0) {
                 $tmpstr = mb_substr($ret, 0, 1);
                 $prevcsize = strlen($tmpstr);

Kind regards,
Fuchi


This event sent from IssueTracker by jnansi  [Support Engineering Group]
 issue 96115
Comment 8 Warren Togami 2006-07-10 13:21:45 EDT
Testing in FC with squirrelmail-1.4.7-2.
Comment 14 Red Hat Bugzilla 2006-09-26 08:28:13 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0668.html

Note You need to log in before you can comment on or make changes to this bug.