Bug 196017 - squirrelmail cannot convert Subject to zen-kaku kata-kana.
Summary: squirrelmail cannot convert Subject to zen-kaku kata-kana.
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: squirrelmail
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Warren Togami
QA Contact:
Depends On:
Blocks: 176344
TreeView+ depends on / blocked
Reported: 2006-06-20 12:34 UTC by Issue Tracker
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHSA-2006-0668
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-09-26 12:28:13 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0668 0 normal SHIPPED_LIVE Moderate: squirrelmail security update 2006-09-26 04:00:00 UTC

Comment 1 Issue Tracker 2006-06-20 12:34:35 UTC
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):

How reproducible:

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,

Expected results:

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

Kind regards,
This event sent from IssueTracker by jnansi  [Support Engineering Group]
 issue 96115

Comment 3 Issue Tracker 2006-06-20 12:34:52 UTC
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 

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 */
    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
not cause a problem, because of mb_convert_kana() will work against
all strings. And I confirmed the problem has been corrected with this

--- 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() {
         case 'encodeheader':
             $result = '';
+           $ret = mb_convert_kana($ret, "KV");
             if (strlen($ret) > 0) {
                 $tmpstr = mb_substr($ret, 0, 1);
                 $prevcsize = strlen($tmpstr);

Kind regards,

This event sent from IssueTracker by jnansi  [Support Engineering Group]
 issue 96115

Comment 8 Warren Togami 2006-07-10 17:21:45 UTC
Testing in FC with squirrelmail-1.4.7-2.

Comment 14 Red Hat Bugzilla 2006-09-26 12:28:13 UTC
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.


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