/usr/share/IlohaMail/lang/Windows-1253.inc is in ilohamail 0.8.14-0rc3sid6.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | <?php
/////////////////////////////
// Windows-1251.inc
// (C)2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
// CyrLize function by Yozh <yozh.com.ua>
//
// Description:
// Encoding library for the Windows-1251 charset (Cyrillic).
// Comments:
// The LangConvert function in this charset library, unlike others,
// uses the third parameter to determine how to convert.
//
// This file is part of IlohaMail. IlohaMail is free software released
// under the GPL license. See enclosed file COPYING for details, or
// see http://www.fsf.org/copyleft/gpl.html
////////////////////////////
include_once("../include/qp_enc.inc");
function LangIs8Bit($string){
$len = strlen($string);
for ($i=0; $i < $len; $i++)
if (ord($string[$i])>=128) return true;
return false;
}
function CyrLize ($string, $cset) {
$charset=strtolower($cset);
if ($charset=="koi8-r") {
$string=convert_cyr_string($string, "k", "w");
$c=true;
}else if ($charset=="iso8859-5") {
$string=convert_cyr_string($string, "i", "w");
$c=true;
}else if ($charset=="x-cp866") {
$string=convert_cyr_string($string, "a", "w");
$c=true;
}else if ($charset=="x-mac-cyrillic") {
$string=convert_cyr_string($string, "m", "w");
$c=true;
}else if ($charset=="windows-1251") {
$string=$string;
$c=true;
}
return $string;
}
function LangConvert($string, $charset, $from_charset){
return CyrLize($string, $from_charset);
}
function LangEncodeSubject($input, $charset){
$words = explode(" ", $input);
if ( count($words) > 0){
while ( list($k, $word) = each($words) ){
if (LangIs8Bit($word)) $words[$k] = "=?".$charset."?Q?".qp_enc($word, 76)."?=";
}
$input = implode(" ", $words);
}
return $input;
}
function LangEncodeMessage($input, $charset){
$message=$input;
$result["type"]="Content-Type: text/plain; charset=".$charset."\r\n";
$result["encoding"]="Content-Transfer-Encoding: quoted-printable\r\n";
$result["data"] = qp_enc($message, 78);
return $result;
}
include_once("../lang/common.inc");
function LangWrap($str){
return wordwrap($str);
}
?>
|