Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 154673 Details for
Bug 209105
Bad decoding of multiple Subjects
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
functions/i18n.php sm-1.4.10a patch
i18n.php.diff (text/plain), 2.90 KB, created by
Tomas
on 2007-05-14 17:15:53 UTC
(
hide
)
Description:
functions/i18n.php sm-1.4.10a patch
Filename:
MIME Type:
Creator:
Tomas
Created:
2007-05-14 17:15:53 UTC
Size:
2.90 KB
patch
obsolete
>--- i18n.php.orig 2007-05-14 19:36:36.000000000 +0300 >+++ i18n.php 2007-05-14 20:13:42.000000000 +0300 >@@ -578,34 +578,30 @@ > $ret = mb_strimwidth($ret, 0, $width, '...'); > break; > case 'encodeheader': >- $result = ''; >- if (strlen($ret) > 0) { >- $tmpstr = mb_substr($ret, 0, 1); >- $prevcsize = strlen($tmpstr); >- for ($i = 1; $i < mb_strlen($ret); $i++) { >- $tmp = mb_substr($ret, $i, 1); >- if (strlen($tmp) == $prevcsize) { >- $tmpstr .= $tmp; >- } else { >- if ($prevcsize == 1) { >- $result .= $tmpstr; >- } else { >- $result .= str_replace(' ', '', >- mb_encode_mimeheader($tmpstr,'iso-2022-jp','B','')); >- } >- $tmpstr = $tmp; >- $prevcsize = strlen($tmp); >- } >- } >- if (strlen($tmpstr)) { >- if (strlen(mb_substr($tmpstr, 0, 1)) == 1) >- $result .= $tmpstr; >- else >- $result .= str_replace(' ', '', >- mb_encode_mimeheader($tmpstr,'iso-2022-jp','B','')); >- } >+ /** >+ * First argument ($ret) contains header string. >+ * SquirrelMail ja_JP translation uses euc-jp as internal encoding. euc-jp stores Japanese >+ * letters in 0xA1-0xFE block (source: JIS X 0208 unicode.org mapping. see euc_jp.php >+ * in extra decoding library). Standard SquirrelMail 8bit test should detect if text is >+ * in euc or in ascii. >+ */ >+ if (sq_is8bit($ret)) { >+ /** >+ * Minimize dependency on mb_mime_encodeheader(). PHP 4.4.1 bug and maybe other bugs. >+ * >+ * Convert text from euc-jp (internal encoding) to iso-2022-jp (commonly used Japanese >+ * encoding) with mbstring functions. >+ * >+ * Use SquirrelMail internal B encoding function. 'encodeheader' XTRA_CODE is executed in >+ * encodeHeader() function, so functions/mime.php (encodeHeaderBase64) and functions/strings.php >+ * (sq_is8bit) are already loaded. >+ */ >+ $ret = encodeHeaderBase64(mb_convert_encoding($ret,'ISO-2022-JP','EUC-JP'),'iso-2022-jp'); > } >- $ret = $result; >+ /** >+ * if text is in ascii, we leave it unchanged. If some ASCII chars must be encoded, >+ * add code here in else statement. >+ */ > break; > case 'decodeheader': > $ret = str_replace("\t", "", $ret);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209105
:
137633
| 154673