> Tomas Kuliavas said:
>>> I will repeat my question:
>>> Why when i change my langage to english email header format is fine,
>>> but
>>> when i chage my language in SquirrelMail to Bulgarian header contain
>>> cyrillyc symbols. I not change anything in server configuration only in
>>> SquirrelMail.
>>
>> because yahoo doesn't pass LC_ALL, LANG and LANGUAGE environment
>> variables
>> to qmail-scanner script.
>>
>> When SquirrelMail translations are used, they set these three variables.
>> Without these variables gettext translation does not work. When you send
>> email through /usr/sbin/sendmail, system retains those variables and
>> passes them to qmail-scanner. Qmail scanner uses localized date
>> functions.
>>
>
> Interesting.
>
> Where do we set those environment variables and do we restore the initial
> environment variables at the end of the script?
functions/i18n.php
function set_up_language
.... v 1.173 lines 204-210 ...
----
if ( !ini_get('safe_mode') &&
getenv( 'LC_ALL' ) != $longlocale ) {
putenv( "LC_ALL=$longlocale" );
putenv( "LANG=$longlocale" );
putenv( "LANGUAGE=$longlocale" );
}
setlocale(LC_ALL, $longlocale);
-----
We don't have to restore those variables. SquirrelMail does not have to be
fixed when other application is broken. Variables interact only with our
php scripts and applications that are started by those scripts. They don't
modify default environment on server. If other application uses localized
date/time functions and does not check for 8bit output, it is broken.
Those variables are set in every environment that uses different language.
When you use Evolution, Kmail or Mutt in your language, you have those
variables set and /var/qmail/bin/sendmail or /usr/sbin/sendmail works
correctly.
If user wants to solve the problem, he has to fix qmail-scanner or use
SMTP instead of /usr/sbin/sendmail.
John sees those headers only with squirrelmail. But as I've showed, you
can get them with /bin/mail too. Just set your language environment and
make sure that qmail-scanner gets the message.
--
Tomas
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users