[imp] Problem encoding in the subject
Patrick Boutilier
boutilpj at ednet.ns.ca
Thu Mar 1 10:38:46 PST 2007
Lucien GENTIS wrote:
> Patrick Boutilier a écrit :
>> LEVEAU Stanislas wrote:
>>>
>>> Hi,
>>>
>>> I use the version 3.1.1/Horde and IMP/4.1.2 and I have this problem
>>> with accent only with the subject and when you reply to an email.
>>>
>>> Do you have an idea. This problem is only corrige with horde 3.1.3 /
>>> IMP 4.1.3 ???
>>
>> We still see the problem with Horde 3.1.3 and IMP 4.1.3 .
>>
>> Perhaps it is related to PHP. We are using PHP 5.1.6 .
>>
>>>
>>> Thanks
>>> regards
>>>
>>> Lucien GENTIS a écrit :
>>>> LEVEAU Stanislas a écrit :
>>>>> Hi,
>>>>>
>>>>> When I sent a message with subject contain "ça", when the personn
>>>>> receive the message, the suject is good
>>>>> But when the personn reply the message, the subject begin "Re: ça"
>>>>>
>>>>> Could you have an idea about the encoding of charset in the subject
>>>>> when your reply a message
>>>>>
>>>>> Thanks in advance
>>>>> regards
>>>>> Stan
>>>>>
>>>> Hi,
>>>>
>>>> I encountered this problem with old version of horde (3.0.x)
>>>> along with accents not being displayed in help pages.
>>>>
>>>> But with horde 3.1.3 / IMP 4.1.3, I don't encounter this kind of
>>>> problem anymore.
>>>>
>>>> Lucien
>>>>
>>>
>>
> I use PHP 5.2.1, but I don't think it has to do with this.
>
> Do you encounter this problem with all users ?
>
> All that follows is available for french people (who use french language !)
> because there isn't any fr_CA locale installed in horde/locale.
>
> Verify that horde/config/nls contains: (I guess your language is french
> - IT'S a JOKE)
> $nls['defaults']['language'] = ''; /* It works for me*/
> $nls['languages']['fr_FR'] = 'Français';
> $nls['aliases']['fr'] = 'fr_FR';
> $nls['spelling']['fr_FR'] = '-d francais';
>
> Is locale fr_FR installed on your server ?
>
Yes the fr_FR locale is installed. I have tracked down the problem to
the fact that $prefs->getValue('attrib_text') returns "Patrick Boutilier
<boutilpj at ednet.ns.ca> a écrit :" instead of "Patrick Boutilier
<boutilpj at ednet.ns.ca> a écrit :" (french translation of "Quoting %f:")
I noticed that the CVS version didn't have this problem so I created
this little patch for IMP 4.1.3 based on the CVS code:
--- horde/lib/Horde/Prefs.php.orig 2006-08-17 10:27:43.000000000 -0300
+++ horde/lib/Horde/Prefs.php 2007-03-01 14:01:52.000000000 -0400
@@ -324,11 +324,23 @@
$charset = NLS::getCharset();
}
- return (isset($this->_prefs[$pref]['v'])) ?
- ($convert ?
- $this->convertFromDriver($this->_prefs[$pref]['v'],
$charset) :
- $this->_prefs[$pref]['v']) :
- null;
+ if (isset($this->_prefs[$pref]['v'])) {
+ if ($convert) {
+ if ($this->isDefault($pref)) {
+ /* Default values have the current UI charset. */
+ $value =
String::convertCharset($this->_prefs[$pref]['v'], NLS::getCharset(),
$charset);
+ } else {
+ /* Stored values have the backend charset. */
+ $value =
$this->convertFromDriver($this->_prefs[$pref]['v'], $charset);
+ }
+ } else {
+ $value = $this->_prefs[$pref]['v'];
+ }
+ } else {
+ $value = null;
+ }
+
+ return $value;
}
function __get($name)
More information about the imp
mailing list